codegen error at predict function

3 visualizzazioni (ultimi 30 giorni)
Kwanghyun Sohn
Kwanghyun Sohn il 29 Mar 2021
Modificato: Abhaya il 4 Ott 2024
I am trying to convert my Matlab code to C++ using codegen function, but there is an error that I cannot fix.
There is no error when I use 2019b. But 2021a generate error message.
What should I do to avoid the error?
Part of my code:
Error message:
trainedInBedSVM use 'polynomial':

Risposte (1)

Abhaya
Abhaya il 4 Ott 2024
Modificato: Abhaya il 4 Ott 2024
Hi Kwanghyun,
I encountered a similar issue when trying to use a saved model in MATLAB R2021a. I tried loading and saving the model again in MATLAB R2021a, and it fixed the error for me.
Please follow the steps given below to address the issue:
  • Load the model using MATLAB‘loadLearnerForCoder’function.
mdl = loadLearnerForCoder('CompactInBedSVM');
  • Save the model using MATLAB ‘saveLearnerForCoder’ function.
saveLearnerForCoder(mdl,'CompactInBedSVMNew');
For detailed information on these functions, please refer to the MATLAB documentation linked below.
Hope this helps

Categorie

Scopri di più su MATLAB Coder in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by