フィルターのクリア

Question about Matlab coder

1 回表示 (過去 30 日間)
Johan Johan
Johan Johan 2018 年 7 月 7 日
コメント済み: Johan Johan 2018 年 7 月 7 日
The point between popc(k,1) and cost -- what does it mean?
popc(k,1).Cost=CostFunction(popc(k,1).Position);

採用された回答

Image Analyst
Image Analyst 2018 年 7 月 7 日
I don't know what this has to do with the Coder Toolbox, but anyway the dot indicates a separator between the name of the structure array "popc", and a field of that structure array called "Cost".
popc is a 2-D array (a matrix) of structures. Each structure has two or more fields (members). One of those fields is called "Cost" and another is called "Position". You can find out all of them with this command
allFieldNames = fieldnames(Cost);
That code gives a value to the Cost field of the structure located at row k, column 1 of the matrix of structures.
  1 件のコメント
Johan Johan
Johan Johan 2018 年 7 月 7 日
Thanks for your answer

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by