Borrar filtros
Borrar filtros

Will not plot on force trace

1 visualización (últimos 30 días)
Adrienne
Adrienne el 16 de Mayo de 2014
Comentada: Adrienne el 17 de Mayo de 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)]);

Respuesta aceptada

dpb
dpb el 16 de Mayo de 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 comentario
Adrienne
Adrienne el 17 de Mayo de 2014
it was the extra hold on I was missing! thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by