필터 지우기
필터 지우기

How would I implement a model of a recursive Fibonacci sequence on Simulink?

조회 수: 1 (최근 30일)
Jguyson
Jguyson 2016년 10월 9일
편집: Matt J 2016년 10월 9일
hi
I'm trying to understand Simulink and I wanted to know if anyone has implemented a Fibonacci sequence with a graphical diagram.
Apologies if this is not very clear. I mainly just want a visual representation of it because I am dyslexic.
Thanks
function fib = recursiveFibonaccifinal(N)
if N==0 % Termination condition no 1
fib = 0;
elseif
N==1 % Termination condition no 2
fib = 1;
else
fib = recursiveFibonacci(N-2)+recursiveFibonacci(N-1);
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by