Beantwortet
Local maxima in a matrix
a=[3 6 2 5; 4 9 1 5; 7 3 5 4] n=size(a); [mina,idx1]=min(a(:)) [ii1,jj1]=ind2sub(n,idx1) [maxa,idx2]=max(a(:)) [ii2,jj2]=...

fast 12 Jahre vor | 0

Beantwortet
How to save signal as double in .dat file?
Use <http://www.mathworks.com/help/matlab/ref/fwrite.html fwrite>

fast 12 Jahre vor | 0

Beantwortet
how create correct function
Your function should be something like this function t = Aineq(m,n) q=sparse(m*n,m*n) e=speye(m*n) k1=-4*e a=constraint...

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
How can I open a binary .dat file using matlab?
Use <http://www.mathworks.com/help/matlab/ref/fread.html fread> to read binary files

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
Why am I get discontinuous plot?
Use |./| instead of |/| x = -2*pi:.1:2*pi; y = 2e-6*sin(x).*cos(x)./(10.5e-12*sin(x).^2+13.8e-12*cos(x).^2); plot(x,y)

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
How to represent block diagram with two inputs to state space?
From your diagram we can see that your system is linear, The output y(t) can be written as y(t)=y1(t)+y2(t) y1(t) is ...

fast 12 Jahre vor | 1

Beantwortet
converting a cell array to a matrix
a={rand(1877958,7); rand(1251972,7)}; n=max(cellfun(@(x) size(x,1),a)); b=cell2mat(cellfun(@(x) [x ;zeros(n-size(x,1),7)],a,...

fast 12 Jahre vor | 2

| akzeptiert

Beantwortet
How to concatenate 4000 matrices in matlab?
read this <http://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html>

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
Writing a txt file via matlab
b={'BKY' 'DIS' 'KIY'} fileID = fopen('ko.tck','wt') fprintf(fileID,'%s\n',b{:}) fclose(fileID)

fast 12 Jahre vor | 0

Beantwortet
Stateflow verification of models
Maybe you need this toolbox: <http://www.mathworks.com/videos/systemtest-overview-testing-a-simulink-model-68902.html SystemTes...

fast 12 Jahre vor | 0

Beantwortet
create a binary sequence that consisting of m zeros and n ones in any order.
x1=[zeros(1,5) ones(1,4)] %or N=5; n=4; X1=1:n+N>N

fast 12 Jahre vor | 1

Beantwortet
Matrix dimension problem when asking 'What is your name?'
Use |isequal| instead of |==| prompt = 'What is your name?' N = input(prompt,'s'); if isequal(N,'Jack') disp('Jack...

fast 12 Jahre vor | 0

Beantwortet
Matrix dimension problem when asking 'What is your name?'
Use isequal prompt = 'What is your name?' N = input(prompt,'s'); if isequal(N,'Jack') disp('Jack is great!'); else...

fast 12 Jahre vor | 0

Beantwortet
??? Subscripted assignment dimension mismatch.
This is not clear what you want to do. You have to assign some value to p p=4 P=zeros(3,3); P(3,3)=p

fast 12 Jahre vor | 0

Beantwortet
Extract Numbers from a String
a='f 27//1 29//2 5//3 2//4' b=str2double(regexp(a,'\S+(?=//)','match'))

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
How to separate a single variable from other variables in an equation ?
syms X Y Z X1=solve(10*X-Y+2*Z==6,X) Y1=solve(-X+11*Y-Z==25,Y) Z1=solve(2*X -Y +10*Z==-11,Z)

fast 12 Jahre vor | 0

| akzeptiert

Beantwortet
What is the problem in simple matrix operation.?
Use curly brackets { } [~,idx] = sort(in_st{:,2},'descend')

fast 12 Jahre vor | 0

Beantwortet
how to pass image name dynamically
for k=100 to 102 imshow(sprintf('C:\Users\shraddha\Documents\MATLAB\Snaps\%d.png',k)); end

fast 12 Jahre vor | 0

Beantwortet
How to perform row wise operation for a matrix of 250x250
A(logical(cumprod(A,2)))=40

fast 12 Jahre vor | 1

Beantwortet
How to perform row wise operation for a matrix of 250x250
A=[1 1 1 0 1; 1 1 0 1 1; 1 1 1 0 1; 1 1 0 0 1; 1 1 0 1 0] for k=1:size(A,2) idx=strfind(A(k,:),[1 0]); A(k,1:idx)=40...

fast 12 Jahre vor | 0

Beantwortet
collect rows of a matrix having a desired number in the first row
A=[0 5 3 6 4 5 8 4 7 5 1 5 6 7 5 6 7 8 9 4 5 2 3 4 3 5 8 3 5 4 4 5 1 9 6 7 1 6 3 7 4 5 3 8 9 2 9 5 0 4 2 5 6 3 4] B=A...

fast 12 Jahre vor | 0

Beantwortet
How to combine several pulled out slices in a pie plot?
A = [1 3 5 7 2 4 9 3; 2 2 7 5 3 8 10 2] s=unique(A) for k=1:numel(s) b=any(ismember(A,s(k))) out{k,1}=s(k) ...

fast 12 Jahre vor | 0

Beantwortet
Is there any way i could plot the two different data on two different plots with different axis scaling?
t=1:10 A=[t' sin(t')] x=A(:,1); y=A(:,2); B=1:100; C=10*cos(B) [ax,h1,h2]=plotyy(x,y,B',C') set(ax(2),'xlim',[min(B) ma...

fast 12 Jahre vor | 0

Beantwortet
Question using fprintf for words
A= {'jan','feb','march','april'}; fprintf('%s \n',A{:})

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
Why is y-axis in loglog not 0?
I think when you set |ylim([0 200])| this will be interpreted as |[log(0) log(200)]|. That means [-Inf log(200)]

fast 12 Jahre vor | 0

Beantwortet
Looping until conditions met
You can use a <http://www.mathworks.com/help/symbolic/mupad_ref/while.html while loop>

fast 12 Jahre vor | 0

Beantwortet
Find Row Vectors In an Array Containing Only Elements from a Vector
out=all(ismember(A,b),2)

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
how to resize a matrix?
a=rand(129,135) % Example a(end+1:135,:)=nan

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
Copy many to one elements within arrays
What platforms? It appears that Matlab will assign values in ascending order

fast 12 Jahre vor | 0

Beantwortet
cell array problem help
v={'bug fixes'; 'stability improved'; 'new feature added'} out=regexp(v,'\S+','match') out= [out{:}]

fast 12 Jahre vor | 0

| akzeptiert

Mehr laden