Answered
How do I put different plots on the same figure on Curve fitting tool application
x1=[2, 4,6,8,10] x2=[1,3,5,7,9] y1=[1,2,3,4,5] y2=[1.1,2.1,3.3,4.4,5.5] plot(x1,y1,'r',x2,y2,'g') %or ploty...

14 years ago | 0

Answered
How can I use local variable from GUI
In opening function chk123=[0 0 0]; set(handles.checkbox1,'userdata',chk123) %In checkbox1 function function chk1=...

14 years ago | 0

Answered
counting n subsequent element of an array
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; n=3 b=arrayfun(@(x) sum(a(x:x+n-1)),1:numel(a)-n+1)

14 years ago | 1

Answered
How to make a button visible in GUIDE?
Set(hObject, 'visible','off')

14 years ago | 0

| accepted

Answered
Combining two different matrices of different sizes
A=[5 6] B=[1 2 3 4 5] m=numel(B); m1=ceil(m/2) C=[A;mean(B(1:m1)) mean(B(m1+1:end))]

14 years ago | 0

| accepted

Answered
cell arrray that stores with every iteration a new set of values
clear y1=@(x)C.*(x)./((x.^p)+1); y2=@(x)(r.*(1-(x./q))); for ii=1:5 for jj=1:5 [aa,bb]= intersections(x,y1(x),x,y...

14 years ago | 0

Answered
How to solve for the coefficients of a polynomial equation?
I=1;T=3 % A*y=b your equation with y=[A;B;C;D] are unknown variables A=[1 1 I^2 I^3 % your first equation T=A+BI+C...

14 years ago | 0

| accepted

Answered
Delete line in GUI
A new plot will automatically erase the previous plot, unless there is something else then a line in your previous plot.

14 years ago | 0

Answered
How can I "install" a function of file exchange in Matlab?
click on download submission, you will download a zip file. After download, unzip your files then use them as matlab files

14 years ago | 2

Answered
Conversion of arrays to cell array
x={'datenum' 'col1' 'col2' 'col3' 'col4' 731034 4 3 NaN 3 731035 5 NaN 2 1 731036 ...

14 years ago | 1

| accepted

Answered
Copy a plot into word without loosing quality
Try this figure; [X,Y] = meshgrid(-8:.5:8); R = sqrt(X.^2 + Y.^2) + eps; Z = sin(R)./R; mesh(Z); saveas(gca,'filename....

14 years ago | 1

Answered
When i execute function my matlab is being struck; is there any wrong with this simple code???
If *arr* is a real array, then there will be a problem with *fgt(arr(i),arr(i+1))*

14 years ago | 1

| accepted

Answered
Why am I getting the error: Subscript indices must either be real positive integers or logicals.
clear A=rand(3,3) b=[1 2 3] [nr nc] = size(A); if (nr ~= nc) disp('Must be n x n matrix try again'); return ...

14 years ago | 0

Answered
Why does XY Graph affect algebraic loop solver?
Ben, In the previous question <http://www.mathworks.com/matlabcentral/answers/58271-why-does-algebraic-loop-not-solve> I've simu...

14 years ago | 0

Answered
Input Vector Graphics into Matlab
You can save your vector graphics as a jpg (or tif,...) file, then read it with imread. I don't think that matlab handles such f...

14 years ago | 0

Answered
error (rounding or user) in simple math op
Use format short The problem is simply caused by the way, real data are stored in memory

14 years ago | 0

| accepted

Answered
How to lock the lines between simulink blocks
When you make a bad move, just click on *UNDO*

14 years ago | 0

Answered
Why does algebraic loop not solve?
If you have to simulate this equation: y(n+1)=y(n)+1 you can't do it just by using one *sum* block, which causes an alge...

14 years ago | 0

Answered
How to solve State space equation with disturbance matrix
Rewrite your equation as |xdot=A.x+H.u1| with |H=[B;E]| and |u1=[fs;q;g]| and |y=C.x+D1.u1| , with |D1=[D;F]| ...

14 years ago | 0

Answered
Generation of a simulink block/blockset by MATLAB editor
Look at new_system open_system add_block set_param add_line %Example %-------------------creating a model-------...

14 years ago | 3

| accepted

Answered
How to generate names?
A=cell(1,6); for ii=1:6 A{ii}=sprintf('Sheetname%d' , ii) end

14 years ago | 0

Answered
Unable to find a matching block state corresponding to element 1 of signals structure array
I think, the model you are using, is not yours. Open your model in its original folder, then right click on the model, thyen cli...

14 years ago | 0

| accepted

Answered
Creating a submatrix from a matrix
A = {1 3 7; 10 1 2; 11 5 9; 12 2 5}; B=cell2mat(A); out1=B(B<7); n=numel(out1); n1=floor(sqrt(n)); m1=ceil(n/n1); out=ce...

14 years ago | 0

Answered
sum of each column of matrix
A=rand(300,200); out=sum(A)

14 years ago | 2

| accepted

Answered
Generate triangle input with curve edge
fs=1000; ts=1/fs te=ts/30; t=-ts/2:te:ts/2 y=(ts/2-abs(t))*fs*4-1 close,plot(t,y)

14 years ago | 0

Answered
how to change data
Improve my previous code speed three times x=[1 0 0 1 1 1 1 0 1 1 0] a=find(x); b=[ 1 diff(a)]; b(b==1)=0; b(b~=0)=1; ...

14 years ago | 0

| accepted

Answered
How to retrieve and use information from a site?
Use *urlread* function

14 years ago | 0

Answered
How to filter out values which are greater than a defined threshold?
max_value= [0.0390719994902611 0.0769229978322983 0.0561660006642342 0.0695969983935356 0.0720390006899834 0.046397998929...

14 years ago | 0

| accepted

Answered
How to plot min,max and mean values from a data set?
a=rand(10,3) % your data x=a'; y=x(:) plot(y)

14 years ago | 0

Answered
how to change data
clear x=[1 0 0 1 1 1 1 0 1 1 0] e=0,c=0,d=[] for k=1:numel(x) if x(k) e=e+not(c) c=c+1 d=[d...

14 years ago | 0

Load more