Filter löschen
Filter löschen

Will not plot on force trace

1 Ansicht (letzte 30 Tage)
Adrienne
Adrienne am 16 Mai 2014
Kommentiert: Adrienne am 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)]);

Akzeptierte Antwort

dpb
dpb am 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 Kommentar
Adrienne
Adrienne am 17 Mai 2014
it was the extra hold on I was missing! thank you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by