Will not plot on force trace

1 vue (au cours des 30 derniers jours)
Adrienne
Adrienne le 16 Mai 2014
Commenté : Adrienne le 17 Mai 2014
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)]);

Réponse acceptée

dpb
dpb le 16 Mai 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.
  1 commentaire
Adrienne
Adrienne le 17 Mai 2014
it was the extra hold on I was missing! thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by