Answered
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]=...

11 years ago | 0

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

11 years ago | 0

Answered
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...

11 years ago | 0

| accepted

Answered
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

11 years ago | 0

| accepted

Answered
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)

11 years ago | 0

| accepted

Answered
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 ...

11 years ago | 1

Answered
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,...

11 years ago | 2

| accepted

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

11 years ago | 0

| accepted

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

11 years ago | 0

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

11 years ago | 0

Answered
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

11 years ago | 1

Answered
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...

11 years ago | 0

Answered
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...

11 years ago | 0

Answered
??? 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

11 years ago | 0

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

11 years ago | 0

| accepted

Answered
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)

11 years ago | 0

| accepted

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

11 years ago | 0

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

11 years ago | 0

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

11 years ago | 1

Answered
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...

11 years ago | 0

Answered
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...

11 years ago | 0

Answered
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) ...

11 years ago | 0

Answered
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...

11 years ago | 0

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

11 years ago | 1

| accepted

Answered
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)]

11 years ago | 0

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

11 years ago | 0

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

11 years ago | 1

| accepted

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

11 years ago | 1

| accepted

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

11 years ago | 0

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

11 years ago | 0

| accepted

Load more