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

4 views (last 30 days)
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

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!