What is the error in this code.
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
%expansion of maclaurine series
function result = expansion(n,x)
c = [1];
d = [1:n];
a = [x.^d];
for i=1:n
vec = [vec,1./prod(1:i)];
end
e = sum(a.*vec);
result = [1+sum];
end
Réponses (1)
James Tursa
le 17 Mar 2018
Did you mean:
result = 1 + e;
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!