Answered
Help with looping problem
y0=1 x = 0:0.1:pi n=length(x); eval(sprintf('rx%d=[x(%d) x(%d)],',repmat((1:n),3,1))) eval(sprintf('ry%d=[y0 sin(x(%d))],'...

14 years ago | 0

Answered
How to send intermediate data(here duty cycle) sequentially from embedded function file to simulink block?
The output is sent after the loop is finished. Use a *for iterator subsystem* .block

14 years ago | 3

Answered
How to create an input that is a function of State
In your SS block, |*initialy c=[1 0 0 0;0 0 1 0]*| and |*d=[0 0;0 0]*| If you want to use x2 and x4, set |*c=eye(4)*| and |*d...

14 years ago | 0

| accepted

Answered
HOW SHOULD I REPEAT THE ECG WAVEFORM BY USING A "FOR "LOOP STATEMENT?
You don't need a for loop Y=rand(1,30) % Y your ecg signal n=10 % n number of repetitio...

14 years ago | 1

Answered
Separate strings w.r.t to semicolon
x={'a;b;c;d;f;e;g;t;y;s'} y=regexp(x,';','split') y{:}

14 years ago | 1

| accepted

Answered
What is the method to get step response of differential order system?
N=[1 2]; D=[1 7 12] model=tf(N,D) [y,t]=step(model) plot(t,y) % or t = 0:0.1:10; % vector time u = ones(1,length...

14 years ago | 0

Answered
Index exceeds matrix dimensions
out=Fluorescence (1:40,:)./H(1:40,:)

14 years ago | 0

Answered
Set parameter of Simulink
set_param('TRT_tuning','stop time','359') or stime=359 set_param('TRT_tuning','stop time',num2str(stime))

14 years ago | 0

Answered
Calculating Fourier Series Coefficients Using Custom Matlab Function
Try my submission <http://www.mathworks.com/matlabcentral/fileexchange/37654-get-harmoniques-of-a-real-signal>

14 years ago | 0

Answered
Error-Initial state vector "X0" must be a real vector of length 86
right click on your model, then on |*model properties*| , callbacks, init fcn you will find the initialization command loa...

14 years ago | 0

Answered
what to do if i want to view upper half of image 1 and lower half of image 2 as image 3
h1=imread('image1.jpg'); h2=imread('image2.jpg'); n1=size(h1,1); n2=size(h2,1); h3=[h1(1:ceil(n1/2),:) ;h2(ceil(n2/2):end,...

14 years ago | 1

| accepted

Answered
For command [r,p,k]=residue(b,a), how the roots (p) are generated
The result is the same, they are, just not sorted the same way. [r,p,k]=residue(1,a) p1=roots(a) now compare sor...

14 years ago | 0

Answered
closest day a year back
use [day_number,day]=weekday(datestr(now-365)) % date from now or dat=datenum('21-Sep-2012 21:36:20') [day_n...

14 years ago | 0

Answered
why can't i see the values of the numbers in my matrix?
It says 1.0e+18 because, some of your numbers are near 1.0e+18. It will not display 123444444444444444. then the other numbers...

14 years ago | 0

| accepted

Answered
How can I calculate the magnitude of n-dimensional vector by Matlab's commands?
v=[2 3 4 5] ampv=sqrt(v.^2)

14 years ago | 0

Answered
Need Help to find the error
r = 1; x =r.*cos(theta); y =r.*sin(theta); plot(x,y,'.') v = [x;y]; w=A*v; xcoor=w(1,:); ycoor=w(2,:); figure,plo...

14 years ago | 1

| accepted

Answered
Intersection of trajectories in 3D
v1=[x1 y1 z1] % trajectory 1 v2=[x2 y2 z2] % trajectory 2 plot3(x1,y1,z1) hold on;plot3(x2,y2,z2,'r') idx=find(~all(v1-v...

14 years ago | 0

| accepted

Answered
Correct plot in matlab
You should use |*Shear=[Shear,...*| instead of |*Shear=[X,..*| Shear=0;X=0; while X<=0.5 Shear =[Shear,(q)/(2*h)*int(((...

14 years ago | 0

Answered
MATLAB: spilliting an array into n parts and then joining them again forming a histogram
a=1:1000 out=reshape(a,20,[]) % If you want to put a result in a cell array res=arrayfun(@(x) out(:,x),1:1000/20,'...

14 years ago | 0

Answered
How to pass data from Edit Text Box in GUI to Constant Block in Simulink?
c=10 set_param('yourmodelname/Constant','value',num2str(c)) %yourmodelname is your simulink model name

14 years ago | 2

Answered
Fill a matrix with same values
A= [1 8 9 7 7 4 0 0 0 0 0 0 0 0 0 0 0 0 9 8 6 5 5 1 0 0 0 0 0 0] for k=find(~all(A,2))' ...

14 years ago | 1

Answered
how to use pause command inside embedded matlab in simulink?
function pause is not supported with matlab function, use instead interpreted matlab function <<http://azzimalikcom.ipage.com...

14 years ago | 0

| accepted

Answered
FFT size less than signal length
clear y=rand(16384,1) Y=fft(y) size(Y) % the result is 16384

14 years ago | 0

Answered
initialize a MxN matrix with the same number
A=zeros(M,N)

14 years ago | 6

Answered
Field of non-structure array Error
I guess you are using for example a variable y.field1 where field1 does'nt exist

14 years ago | 0

Answered
how to introduce delay in matlab code
If you are using Simulink, you can use a |*Unit Delay*| block from |*Simulink/Discret*|

14 years ago | 0

Answered
linkaxes(ax,'x') + candle() + automatic adjustment of y limits of subplots
x=0:0.1:10; ax(1)=subplot(2,1,1); ax(2)=subplot(2,1,2); plot(ax(1),t,sin(2*t)) plot(ax(2),t,2*sin(t)) linkaxes(ax,'x'...

14 years ago | 0

Answered
How Can I replicate matrix in a loop ?
x=0.1:0.1:0.9 B=repmat(reshape(x,1,1,length(x)),20,40)

14 years ago | 0

| accepted

Answered
calculating dead band "number of skipped steps after reversing direction"
plot your data A and B in the same figure plot(A,'r') hold on plot(B) then use a data cursor button from you...

14 years ago | 0

Answered
urgent please help to find the best G and A with following equations using least squares method
If your equation is F * x = b with x=[x1;x2] your unknowns variables x= inv(F'*F)*F'*b Example F=rand(3,2) b...

14 years ago | 0

Load more