MATLAB: Suppressing output from user defined function

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;
i have this function to calculate fibbonaci sequence, but i get outputs despite having semicolons on everything.
Can anyone tell me why?

Best Answer

When you call your function use a semi colon at the end of the function to suppress the output.
try f=fib(n) and f=fib(n); in the command line to see the results