What is the error in this code.

%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

Risposte (1)

Questa domanda è chiusa.

Richiesto:

il 17 Mar 2018

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by