Setting threshold in my plot

8 visualizaciones (últimos 30 días)
Vedhashree M
Vedhashree M el 22 de Dic. de 2020
Comentada: Adam Danz el 29 de Dic. de 2020
suppose if i have x data which ranges from 1:16000 and there is y data which covers wide range of values from min - 0 to max - 150, now i set my threshould for y as 110
i want my condition to be as,
if y > 110 to display plot for the section of data in which y exceeds 110, how can i do this

Respuestas (1)

VBBV
VBBV el 22 de Dic. de 2020
%true
ylim([111 150])
Use this after plot command
  2 comentarios
Vedhashree M
Vedhashree M el 29 de Dic. de 2020
Thanks it worked
Adam Danz
Adam Danz el 29 de Dic. de 2020
If you just want to plot the data that meets your threshold, use indexing.
idx = y > 110;
plot(x(idx), y(idx))
assuming x and y are vectors

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by