I have some problem when plotting the graph, anyone can help? Thanks

3 vues (au cours des 30 derniers jours)
This is my code
for x = -10:10
y = 2^(0.4*x)+5
plot(x,y,'g')
end

Réponse acceptée

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh le 27 Juin 2015
Modifié(e) : Salaheddin Hosseinzadeh le 27 Juin 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')

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by