Coder gives error Directly accessing field or property of nonscalar struct or object not supported for code generation.
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Andy
am 14 Jan. 2019
This post looks like a duplicate of https://www.mathworks.com/matlabcentral/answers/439222-matlab-coder-error-directly-accessing-field-or-property-of-nonscalar-struct-or-object-not-supported please see the answer there.
0 Kommentare
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!