I have some problem when plotting the graph, anyone can help? Thanks
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Erwin Koman
am 27 Jun. 2015
Kommentiert: Erwin Koman
am 27 Jun. 2015
This is my code
for x = -10:10
y = 2^(0.4*x)+5
plot(x,y,'g')
end
0 Kommentare
Akzeptierte Antwort
Salaheddin Hosseinzadeh
am 27 Jun. 2015
Bearbeitet: Salaheddin Hosseinzadeh
am 27 Jun. 2015
Hi,
You need to store y first.
x = -10:10;
for i = 1:numel(x)
y(i) = 2^(0.4*x(i))+5
end
plot(x,y,'g')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!