wrong function plot different than wolframalpha
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MAJED
am 23 Jun. 2014
Kommentiert: MAJED
am 23 Jun. 2014
I wrote this code to plot a function
y=-1:0.05:15;
yprim= (0.75*y)-(0.05*y.^2)-((1.5*y.^3)/(1.25+y.^3));
plot(y,yprim)
hold on
grid on
xlabel('y');
ylabel('dy/dt');
title('plot of function(1) with b=0.05');
it keep giving me the wrong plot can i have some help
1 Kommentar
dpb
am 23 Jun. 2014
Well, what do you think is wrong? It pretty much is what you coded; now perhaps that isn't what you really intended but we can't tell that with nothing else to go on...
Akzeptierte Antwort
the cyclist
am 23 Jun. 2014
I'm guessing you meant
yprim= (0.75*y)-(0.05*y.^2)-((1.5*y.^3)./(1.25+y.^3));
Notice the ./ where you just had /
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!