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

3 ビュー (過去 30 日間)
I have saved my trained SVM model using saveLearnerforCoder, and am trying to generate fixed point C code using codegen. However, I get the abover error using codegen.
saveLearnerForCoder(classificationSVM,'Classifier_FP');
generateLearnerDataTypeFcn('Classifier_FP',predictor_data);
T = Classifier_FP_datatype('Fixed')
X_fx = cast(predictor_data,'like',T.XDataType);
codegen EntryPointFcn -args {X_fx,coder.Constant(T)}
The error points to the line validateattributes in a built in function validateFields(Instr). How can I fix this issue?
  2 件のコメント
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 8 月 20 日
Can you please paste the full error message for the better understanding
Darshan Ramakant Bhat
Darshan Ramakant Bhat 2020 年 9 月 11 日
Hi Nikita,
If the issue still persists, please contact MathWorks Technical support using below link :
Please provide us proper steps & files to reproduce the issue from our end.
Thanks,
Darshan Bhat

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSingle-Precision Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by