필터 지우기
필터 지우기

Splitting time series into segments

조회 수: 8 (최근 30일)
Aimee Kate Darias-O'Hara
Aimee Kate Darias-O'Hara 2020년 7월 6일
답변: dpb 2020년 7월 6일
I'm looking to create a plot which is divided into segments.
I have a matrix that looks like 'State_ID' 'Time' 'DD' 'SR' 'H'. State_ID runs from 1-26. I'm looking to create a plot which has a DD, SR, and H values across time on the x axis but divided into different colours or line types according to what the State_ID is?

답변 (1개)

dpb
dpb 2020년 7월 6일
Use findgroups to segregate the state groups and plot() over those group indices.
Converting the array to a table makes things neater and simpler as can then use varfun/rowfun and friends may be helpful

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by