How to plot with continuous line
5 次查看(过去 30 天)
显示 更早的评论
Hi, I have an array and I want to plot it into graph. My problem is I got a dotted graph line and not a continuous one. How should I change my code to solve this problem? My code look like this:
Figure(1) hold on
for i= 1:5 array(i) = i*3; plot (i, array(i)); end
0 个评论
采纳的回答
Azzi Abdelmalek
2012-11-24
编辑:Azzi Abdelmalek
2012-11-24
Use plot after the loop
for ii= 1:5
x(ii)=ii
array(ii) = ii*3;
end
plot (x, array);
%don't use i and j as variables (used with comlex numbers)
5 个评论
Azzi Abdelmalek
2012-11-24
编辑:Azzi Abdelmalek
2012-11-24
I can't tell exactly, that depends on your matlab version, also on your computer power and memory. look at this link http://www.mathworks.com/support/solutions/en/data/1-IHYHFZ/index.html
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!