Coder gives error Directly accessing field or property of nonscalar struct or object not supported for code generation.

20 ビュー (過去 30 日間)
upol
upol 2019 年 1 月 10 日
回答済み: Andy 2019 年 1 月 14 日
Why this gives problem in C Coder. Error: Directly accessing field or property of nonscalar struct or object not supported for code generation.
s1=string({OPS_FLT(:).ACFT_ID})
s2=OPS_FLT(2).ACFT_ID
uuindex=find(strcmpi(s1,s2))
({OPS_FLT(:).ACFT_ID}) has already been defined as
OPS_FLT(1).ACFT_ID="apple"
OPS_FLT(2).ACFT_ID="orange"
I am trying to find orange from the array. It works in Matlab but not in C Coder

回答 (1 件)

Andy
Andy 2019 年 1 月 14 日

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by