fplot invalid parameter error
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Error occured at line 19, and it says invalid parameter.
Could you help solve this problem?
m=100;
k1=1500;
k2=2500;
k3=700;
wb=4.4;
Y=0.05;
w1=sqrt(k1/m);
w2=sqrt(k2/m);
w3=sqrt(k3/m);
r1=wb/w1;
r2=wb/w2;
r3=wb/w3;
syms t
yt=Y*sin(wb*t);
X1=Y*1/abs(1-r1^2)*cos(wb*t-pi()/2);
X2=Y*1/abs(1-r2^2)*cos(wb*t-pi()/2);
X3=Y*1/abs(1-r3^2)*cos(wb*t-pi()/2);
fplot(yt,[0:0.1:10])
setcurve('color','black')
hold on
fplot(X1,t,[0:0.1:10])
setcurve('color','red')
fplot(X2,t,[0:0.1:10])
setcurve('color','green')
fplot(X3,t,[0:0.1:10])
legend('yt','x1','x2','x3')
legend('show')
0 Commenti
Risposte (1)
VBBV
il 24 Apr 2022
Modificato: VBBV
il 24 Apr 2022
m=100;
k1=1500;
k2=2500;
k3=700;
wb=4.4;
Y=0.05;
w1=sqrt(k1/m);
w2=sqrt(k2/m);
w3=sqrt(k3/m);
r1=wb/w1;
r2=wb/w2;
r3=wb/w3;
syms t
yt=Y*sin(wb*t);
X1=Y*1/abs(1-r1^2)*cos(wb*t-pi()/2);
X2=Y*1/abs(1-r2^2)*cos(wb*t-pi()/2);
X3=Y*1/abs(1-r3^2)*cos(wb*t-pi()/2);
fplot(yt,[0 10])
%setcurve('color','black')
hold on
fplot(X1,t,[0 10])
%setcurve('color','red')
fplot(X2,t,[0 10])
%setcurve('color','green')
fplot(X3,t,[0 10]) % use a range
legend('yt','x1','x2','x3')
legend('show')
Specify a range to fplot
1 Commento
VBBV
il 24 Apr 2022
fplot(yt,[0 10],'k')
%setcurve('color','black')
hold on
fplot(X1,t,[0 10],'r')
%setcurve('color','red')
fplot(X2,t,[0 10],'g')
%setcurve('color','green')
fplot(X3,t,[0 10],'y') % use a range
legend('yt','x1','x2','x3')
legend('show')
There is no function named setcurve in MATLAB
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!