I have some problem when plotting the graph, anyone can help? Thanks
1 次查看(过去 30 天)
显示 更早的评论
This is my code
for x = -10:10
y = 2^(0.4*x)+5
plot(x,y,'g')
end
0 个评论
采纳的回答
Salaheddin Hosseinzadeh
2015-6-27
编辑:Salaheddin Hosseinzadeh
2015-6-27
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')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!