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

2 次查看(过去 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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by