Coding and ploting of a serie
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
OLuxanna
am 29 Okt. 2022
Kommentiert: OLuxanna
am 29 Okt. 2022
Hello Everbody;
I'm newby to Matlab and I'm trying to write a code of this serie and trying to get the same plot of it. However ;whatever I have tried to do I couldnt manage to obtain them. May someone please help me?
here Vm(t)=0.18 m/s and the parameters that I need to use areHere what I've tried to do so far;
t= 0:0.001:1; %time
a=[0.05282 -0.00909 -0.02733 0.02509 -0.00268];
b=[-0.04866 -0.0104 0.002598 0.02111 -0.01372];
w=8.483; %angular frequency
n=length(a);
n=length(b);
vel=zeros(n, length(t));
for i = 1:n
vel(i,:) = (0.18*0.1308)/(0.1308+sum(a(i)*cos(8.483*t*(i))+b(i)*sin(8.483*t*(i))));
end
hold on;
box on;
plot(t,vel(1,:), 'b', 'Linewidth', 2)
0 Kommentare
Akzeptierte Antwort
David Hill
am 29 Okt. 2022
t= 0:0.001:1;
n=1:5;
a=[0.05282 -0.00909 -0.02733 0.02509 -0.00268];
b=[-0.04866 -0.0104 0.002598 0.02111 -0.01372];
w=8.483;
vm=.18;
a0=.1308;
vel=vm/a0*(a0+sum(a.*cos(w*n.*t')+b.*sin(w*n.*t'),2));
plot(t,vel,'b','LineWidth',2)
3 Kommentare
David Hill
am 29 Okt. 2022
t= 0:0.001:1;
n=1:5;
a=[0.05282 -0.00909 -0.02733 0.02509 -0.00268];
b=[-0.04866 -0.0104 0.002598 0.02111 -0.01372];
w=8.483;
vm=.18;
a0=.1308;
s=a.*cos(w*n.*t')+b.*sin(w*n.*t')%look at this matrix
sum(s,2)%sums the matrix along the rows
vm/a0*(a0+ans)%then just add and multiply by some constants
%ready to plot
plot(t,ans)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

