Fixing the interval
2 次查看(过去 30 天)
显示 更早的评论
I have a curve plotted against time from 0s to 10s, but I want that my curve should start at 2 and end at 10,how can I achieve that?
0 个评论
采纳的回答
更多回答(1 个)
Jan
2011-7-6
Set the Y-values for the plot accordingly:
figure;
plot(rand(1, 11), linspace(2, 10, 11));
Or do you want to crop the first seconds?
figure;
AxesH = axes;
plot(rand(1, 11), 0:10);
pause(1);
set(AxesH, 'XLim', [2,10]);
2 个评论
Jan
2011-7-6
@Kavish: Please mention in the question, if the problem concerns Simulink. Then I can save my time for answering, because I have not worked with Simulink ever.
And if you know this in Matlab, I do not understand, why you accept an answer, which does not solve your problem. This reduces the chance, that an experienced Simulink will look in this thread later on.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!