How to rectify 'undefined function or variable'. errors. in code generation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am currently working on a svm project. I have created my model and it's working well. I tried to generate the C code for the model using 'learnerCoderConfigurer' and 'saveCompactModel' but I'm getting errors 'undefined function or variable'. Attached is a copy of my code.
2 Kommentare
Adam Danz
am 30 Nov. 2018
Your question is impossible for us to answer without more infomration.
The error your getting means exactly what it states: you have a variable or a function in your code that is undefined.
You're loading variables (and/or functions) at the beginning of your code and we can't see what you're loading so there's no way for us to know what is undefined in your code.
Fortunately, matlab also tells you the line of your code that is causing the problem and it even tells you the exact item that is undefined. However, you haven't shared that information with us.
If you provide the full error message that would be a good start.
Antworten (1)
Adam Danz
am 30 Nov. 2018
In your attached sample of code, given the error message, "saveCompactModel" seems to be a function and matlab doesn't have access to it.
The same is probably true for the learnerCoderConfigurer function.
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!