Answered
How to delete value array and sum the residual value?
a(b==1)=[];

13 years ago | 0

Answered
how to add an image file?
Use imread functionn

13 years ago | 0

Answered
round off in matlab
format long

13 years ago | 1

| accepted

Answered
How to convert a model than can be run with simulink to a function?
Yes it's possible to make a script that do what your model is doing. You have to know the mathematical model of your system, the...

13 years ago | 0

Answered
How do I plot y(t) vs x(t) for all t in MATLAB?
plot3(t,x,y)

13 years ago | 0

| accepted

Answered
ss2zp and tf2zp give different results?
If you want to make a correct comparison [z2,p2,k2] = zpkdata(Gzpk2,'v') [sort(z1) sort(z2)] [sort(p1) sort(p2)] [sort(k...

13 years ago | 0

Answered
How to write cell array into a csv file
use <http://www.mathworks.com/help/matlab/ref/csvwrite.html csvwrite> functionn

13 years ago | 1

Answered
How to plot diffterent x and y values in same graph???
plotyy(x1,y1,x2,y2)

13 years ago | 0

Answered
plotting an array of doubles
Use snr1(i)

13 years ago | 0

Answered
index must be a positive integer or logical
You can not use 0 as index, it must be 1,2,3,... or logical(1) and logical(0)

13 years ago | 0

Answered
Facing problem with Relational Operation
use if all(abs(R_miss_new-R_miss_old)<d) You are comparing two vectors, what about this case? R_miss_new=[1 2 3 4];...

13 years ago | 0

| accepted

Answered
Is there an interface in simulink to connect a motor model and an embedded program?
You can use <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function> block

13 years ago | 0

| accepted

Answered
How to eliminate duplicate rows without sorting column in Matlab
unique(A,'stable')

13 years ago | 2

Answered
get the value of a signal at spesific time
out=y(t==2) % for t=2

13 years ago | 0

| accepted

Answered
Why can't I tune a tunable parameter during Simulation?
That means that your parameters are not tunable

13 years ago | 0

Answered
How to detect a peak from a graph
Use findpeaks function

13 years ago | 0

| accepted

Answered
Take submatrix out of large matrix starting from a certain element
a=rand( 1024,512); [n,m]=size(a); ii=randi(n-32); jj=randi(m-15); out=a(ii:ii+31,jj-16:jj+15);

13 years ago | 1

Answered
how to random value?
n=3 a=rand*n %

13 years ago | 0

Answered
Searching for the most frequently occurring cell in a cell array.
A={[4 5], [1 2], [3 4], [1 2],[4 5],[1 2]} a=cell2mat(A') b=unique(a,'rows') for k=1:size(b,1) numb(k)=sum(ismember(a,...

13 years ago | 0

| accepted

Answered
How to count certain characters in a word?
word='matlabprogram' Lettre='abcd' for k=1:numel(Lettre) m=Lettre(k); assignin('base',m,sum(ismember(word,m))) ...

13 years ago | 0

Answered
Matlab/Simulink - manual switch
You should use this <http://www.mathworks.com/help/simulink/slref/switch.html switch>

13 years ago | 0

| accepted

Answered
How can I delete a certain number of rows in a vector?
idx=find(A) idx1=[idx(1:158) idx(end-19:end)] A(idx1)=[];

13 years ago | 1

Answered
How to delete rows where one element is forced to meet some criteria off of a 2xn array
A = [time column, measurement column] B = A(A(:,2)>threshold,:)

13 years ago | 0

| accepted

Answered
How to compare cell A and cell B
out=cellfun(@(x) ismember(x,cell2mat(B)),A,'un',0) F=cellfun(@(x) find(ismember(cell2mat(B),x)),A,'un',0)

13 years ago | 0

Answered
what is wrong with this code?
How did you run your code? You should not run the code, in windows command type this X=10 Y = sudoku(X)

13 years ago | 0

| accepted

Answered
fft of a signal
Example fs=40 t=0:1/fs:99/fs; y=rand(1,100); Yk=fft(y); N=numel(y) f=fs*(0:(N-1))/N % frequencies stem(f,abs(Yk))

13 years ago | 0

Answered
call notepad or textdoc to open a *.txt file from matlabRemove
If you mean open a textfile from matlab winopen('folder/nomdefichier.txt')

13 years ago | 1

| accepted

Answered
Different scope result for two different run times
I 've faced the same problem, I was using 1/p block. But could not find the explanation.

13 years ago | 0

Answered
Passing data from pop up menu to a push button using conditional statements
butt.handles = butt; should be handles.butt = butt;

13 years ago | 0

Answered
writing a matrix into a file
dlmwrite('file.txt',A)

13 years ago | 1

| accepted

Load more