Matlab language to C
Afficher commentaires plus anciens
Why this functions doesn't work on matlab coder
function [S,er]=somm1(n)
%n est le nombre de terme de la serie
S=0;
for x = 1:n
S=S+4*(-1)^(x-1)*(1/(2*x-1));
er=abs(S-pi)/pi;
end
It is saying that 'er' is not assigned on some exucution path.
How can I resolve this problem? Thank you
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Coder dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!