Will not plot on force trace
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
dpb
on 16 May 2014
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.
More Answers (0)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!