Why wont all 4 subplots not work?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Collin Kerr
il 7 Apr 2016
Commentato: Collin Kerr
il 7 Apr 2016
subplot(2,2,1)
fplot('cos(u-45)',[0 360])
subplot(2,2,2)
fplot('3*cos(2u)-2',[0 360])
subplot(2,2,3)
fplot('sin(3u)',[0 360])
subplot(2,2,4)
fplot('-2*cos(u)',[0 360])
%0 to 360 is degrees just an fyi
2 Commenti
Risposta accettata
the cyclist
il 7 Apr 2016
Because "2u" is not correct MATLAB syntax for multiplication. You need "2*u".
This code runs:
u = 0:360;
subplot(2,2,1)
fplot('cos(u-45)',[0 360])
subplot(2,2,2)
fplot('3*cos(2*u)-2',[0 360])
subplot(2,2,3)
fplot('sin(3*u)',[0 360])
subplot(2,2,4)
fplot('-2*cos(u)',[0 360])
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Subplots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!