Will not plot on force trace
1 次查看(过去 30 天)
显示 更早的评论
The script below will plot the commented out plot (a jump height data graph i.e. time against force). But it will not allow me to put two round circles of where the person starts to jump and lands. My teacher used this exact code and it worked on hers.
to (means take off) td (means touch down)
%plot (time',fz);
plot (time'([to,td]),fz([to,td]),'or');
xlim ([min(0) max(time)]);
0 个评论
采纳的回答
dpb
2014-5-16
If the variables to and td are the indices for the time values desired in the overall time vector, it would appear that's what you'd get. If they're actually times, "not so much".
You will need a
hold on
between the first plot and the second to keep from replacing it instead of adding to it.
scatter would be better another choice for the two circles, though, because plot will want to draw a straight line between the two unless you're careful to specify the no line line-spec (which did here).
If your instructor's behaves differently, I suspect it isn't exactly the same code.
更多回答(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!