I've a very newbie octave question.
Running this code in octave console is working fine:
function fibo = recfibo(n)
if ( n < 2 )
fibo = n;
else
fibo = recfibo(n-1) + recfibo(n-2);
endif
endfunction
disp(recfibo(5))
By inserting this code in an external file named for example file.m, and executing it through octave file.m
an error occurs:
warning: function name 'recfibo' does not agree with function filename '/Users/admin/Google Drive/file.m' error: 'n' undefined near line 2 column 8 error: called from octave at line 2 column 3
How should I resolve this particular problem?