Call values from the struct file

조회 수: 3 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2020년 11월 20일
댓글: Ameer Hamza 2020년 11월 20일
Hi all,
I have 6 x 1 struct file (attached here). Here it got two entries named Area and second (named bounding box) got four values sepearted by comma.
I would like to acces the fourth value in the bounding box based on the entry which got highest value in the Area
For instnace, in the present file, 6th row of the Area got the max value (i.e. 15525), for this corresponding fourth entry in the 'bounding box' i.e. 276 needs to accessed..
Please help me with this...

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 20일
You can access it like this
[~,idx] = max([props.Area]);
props(idx).BoundingBox(4)
  댓글 수: 2
Turbulence Analysis
Turbulence Analysis 2020년 11월 20일
Great!!! Thanks, Ameer..
It's works perfectly..
Ameer Hamza
Ameer Hamza 2020년 11월 20일
I am glad to be of help!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by