필터 지우기
필터 지우기

Find a parameter in a multi-tiered structure

조회 수: 2 (최근 30일)
Matthew
Matthew 2023년 10월 13일
댓글: Matthew 2023년 10월 16일
I have a structure setup in the following format: fileName.packetName.parameter.data
Where all the parameters across the multiple packetNames are different. I am looking for a solution to not have to specify the packetName as different software versions have parameters located in other packets (i.e. Var1 is in Packet1 in version 1.0 but it moves to Packet2 in version 1.1)

채택된 답변

Walter Roberson
Walter Roberson 2023년 10월 13일
You are perhaps looking for something that MATLAB refers to as "dynamic field names"; https://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.html
  댓글 수: 3
Walter Roberson
Walter Roberson 2023년 10월 16일
You cannot "skip" structure levels.
The facilities you should be looking at are fieldnames and structfun
Matthew
Matthew 2023년 10월 16일
Looks like that'll do, thank you much!

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by