I've created this small program just for simplicity of the question, I am having some trouble using my function inside a while loop
this is the script;
x = 1;
y = 1;
while x<10
y = func(x,y);
x = x + 1;
this is the function, func;
function [] = func(x,y)
y- exp(-x)
end
I get the error of
Error using func
Too many output arguments.
what am I doing wrong