function y = fib( n )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
if ( n == 1 || n== 2 )
y=1;
return ;
else y = fib(n -1) + fib( n -2 ) ;
end
可以运行哦。
function y = fib( n )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
if ( n == 1 || n== 2 )
y=1;
return ;
else y = fib(n -1) + fib( n -2 ) ;
end
可以运行哦。