필터 지우기
필터 지우기

How to use structure arrays to log event information from data

조회 수: 1 (최근 30일)
Daniel
Daniel 2016년 2월 19일
댓글: jgg 2016년 2월 19일
I have time series data, eg, data = [1 850;2 860;3 850;4 800;5 840;6 840;7 790;8 780;9 850;10 850];
I want to use structure arrays to store information like, 1. Duration and indices where data(:,2) => 850 2. And the actual values
This is easy to do with for, if, and counter variables. I specifically want to use structure arrays to learn more. I have no experience in this. I've tried to look online. It would help to start with a practical example like this.
Any help will be appreciated.
  댓글 수: 2
Jos (10584)
Jos (10584) 2016년 2월 19일
Do you have problems understanding what a structure is? Or do you not understand what a structure array is? Or how to convert an simple array to fields?
jgg
jgg 2016년 2월 19일
I don't think structures will do any of this for you; they're just a way to store data of mixed types in a, well, structured way. They don't do any computations for you, nor do they provide more analytical power than any other data type.
The timeseries and table objects do have some associated methods which might be useful, but they don't do a lot more than traditional data types.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by