How to lookup for values in an array

Hi all
dose anyone knows how to find values for points in vector if i have the location of the points?? i have 20 years hourly discharge data, I have a code in matlab that obtsaine all the location of the peaks ( ie., the hours that peak occures). how can I get the discharge values at those locations??

답변 (1개)

Star Strider
Star Strider 2021년 3월 25일

0 개 추천

If the locations of the peaks are indices into the independent and dependent variable vectors, then something like this shoud work:
x_val = x(location_index);
y_val = y(location_index);
.

카테고리

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

태그

질문:

2021년 3월 25일

답변:

2021년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by