フィルターのクリア

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 Center および File ExchangeWhos についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by