function f=fib(n);f=ones(n,1);for i=1:n-2; f(i+2,1)=f(i+1,1)+f(i,1);end;
i have this function to calculate fibbonaci sequence, but i get outputs despite having semicolons on everything.
Can anyone tell me why?
functionoutputsemicolon
function f=fib(n);f=ones(n,1);for i=1:n-2; f(i+2,1)=f(i+1,1)+f(i,1);end;
Best Answer