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

답변 (1개)

VBBV
VBBV 2020년 12월 22일

1 개 추천

%true
ylim([111 150])
Use this after plot command

댓글 수: 2

Vedhashree M
Vedhashree M 2020년 12월 29일
Thanks it worked
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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

질문:

2020년 12월 22일

댓글:

2020년 12월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by