How would I implement a model of a recursive Fibonacci sequence on Simulink?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!