Filtering data in a struct

조회 수: 23(최근 30일)
Jorge Zorrilla Prieto
Jorge Zorrilla Prieto 2020년 5월 19일
답변: Jalaj Gambhir 2020년 5월 22일
I have the following struct: Now I wold like to filter the the data so that I have for each altitude and sensor name(there are 3) the minimum value of the Diameter. Is that possible?
  댓글 수: 1
Mehmed Saad
Mehmed Saad 2020년 5월 19일
Convert structure to table using struct2table It is easy to use for such kind of purpose

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

채택된 답변

Jalaj Gambhir
Jalaj Gambhir 2020년 5월 22일
Hi,
You can convert the struct to table, and then use findgroups to identify the groups based on Altitude and Sensor. After the new table with grouped data is formed, you can use splitapply to find the minimum diameter.
You can refer to an example here.
Hope this helps!

추가 답변(0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by