How to generate c code from MATLAB code as subs is not supported by MATLAB.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yaswanth Sai
am 12 Jan. 2018
Kommentiert: Yaswanth Sai
am 12 Jan. 2018
Hi! I am facing some issues in generating C code from MATLAB coder while I used subs. Please help me to fix this so that I can generate the C code.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 12 Jan. 2018
Nothing in Symbolic Toolbox can be compiled or code generated for.
What you need to do is go through all the formula generation ahead of time. You can then use matlabFunction() with the 'File' option to generate a .m file to implement your algorithm numerically.
If you need to create your formulas at run time, then you will need to find a different approach than using the symbolic toolbox; symbolic toolbox is only available for interactive use.
5 Kommentare
Walter Roberson
am 12 Jan. 2018
You will either need to program in all appropriate calculus yourself or else find a C or C++ library in which someone has already done the work.
Division and trig functions make the task notably more difficult than multinomials.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Function Creation 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!