Generating C Code from MATLAB Code
Show older comments
hello, i'm new in Matlab ;


I'm trying to use Matlab coder to generate my c code, I have some mistakes, I tried many times to fix it, but I can't find a solution, please help me to fix .thanks
1 Comment
Rena Berman
on 30 Oct 2017
(Answers Dev) Restored edit
Accepted Answer
More Answers (3)
Marco
on 1 Oct 2017
0 votes
Hello Nour, It is necessary to inizialize the variables. For example, I see that S is a matrix and you can initialize it as a matrix of all zeros elements: S = zeros(rows,columns).
In the same way you can do for the other variables.
BR Marco
Marco
on 1 Oct 2017
Edited: Walter Roberson
on 1 Oct 2017
0 votes
You can see this link (Walter's answer): https://it.mathworks.com/matlabcentral/answers/269085-error-undefined-function-or-method-min-for-input-arguments-of-type-struct
Marco
on 2 Oct 2017
0 votes
Hello, I think that this error is due to the fact that in the main file (the file where you call your function) you don't pass the three inpu values that the function expects.
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!