Why does plot function just draw points instead of line
显示 更早的评论
Hi, I have a problem with plot function. It only draw points instead of line. LineWidth and putting '-' doesn't work.
% for j=2:stc
for i=2:n-1
M(j,i)=K1*(M(j-1,i+1)-2*M(j-1,i)+M(j-1,i-1))+M(j-1,i);
plot(j,M(j,i),'-','LineWidth',3)
hold on
end
M(j,n)=-K3*(M(j,n-1)-To)+M(j,n-2)
end
With this code I get plot like this:

Does anyone know what is wrong with code and how to get solid line back to plot? Thanks
1 个评论
Christine Tobler
2015-12-31
I don't know what's happening. Does this still happen if you restart MATLAB and directly call
plot([1 2], [1 2], '-')
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!