Fibonacci and Golden Ratio
50 ビュー (過去 30 日間)
古いコメントを表示
One of the ways to compute the golden ration
4 件のコメント
Jan
2011 年 4 月 4 日
@Ashley: Don't give up: As soon as you edit the question and add any details - and a question! - you will get meaningful answers.
Khan Muhammad Babar
2020 年 12 月 17 日
Is there any way to quantify the Golden mean of Image in MATLAB. Please help.
回答 (5 件)
Clemens
2011 年 8 月 17 日
Actually the Golden Ratio is exactly:
( 1 + sqrt(5) ) / 2
so no need for iteration. Proof is easy through z-transform.
2 件のコメント
Walter Roberson
2011 年 8 月 17 日
But that gets back to my original answer, "The Golden Ratio is an irrational number, and thus an infinite number. It is not possible to compute its decimal expansion in a finite amount of time."
Jan
2011 年 8 月 17 日
Fortunately the universe is finite. Therefore I do not believe, that an infinite number will match into it. While there is a minimal Planck length and a minimal Plank time, I propose a Planck eps for irrational numbers. According to Rupert Sheldrake, I claim that PI has as many numbers as has been calculated already. And after reading http://scientopia.org/blogs/goodmath/2010/12/08/really-is-wrong/ I'm not sure at all anymore about this fuzzy digits stuff.
Walter Roberson
2011 年 4 月 4 日
The Golden Ratio is an irrational number, and thus an infinite number. It is not possible to compute its decimal expansion in a finite amount of time.
8 件のコメント
Sean de Wolski
2011 年 4 月 4 日
Soya sausages? That's like one term in the Taylor-series expansion of sausages.
Walter Roberson
2011 年 8 月 17 日
Jan, Soya Beans used for the production of soya products are the dried fruit of the soya plant, and thus were not covered by the Veggi-Toolbox in R2011a (which, I understand, is still withheld from production due to legal battles over whether Tomatoes are fruits or vegetables....)
Walter Roberson
2011 年 4 月 4 日
Let F(t) be Fibonacci number #t. Then
y = 100; %initial guess
x = (F(t+2) * y + F(t+1)) / (F(t+1) * y + F(t));
while x ~= y;
y = x;
x = (F(t+2) * y + F(t+1)) / (F(t+1) * y + F(t));
end
When the loop finishes (no more than a few centuries later, I'm sure), x and y will be the Golden ratio.
3 件のコメント
Kishore
2023 年 7 月 8 日
fib=[0 1];
i=3;
while(i<=21)
fib(i)=fib(i-1)+fib(i-2);
gr=fib(i)/fib(i-1)
i=i+1;
end
disp(fib)
0 件のコメント
Guna
2024 年 4 月 16 日
% Function to calculate Fibonacci sequence up to a certain number of terms
function fib_sequence = fibonacci(n)
fib_sequence = zeros(1, n);
fib_sequence(1) = 0;
fib_sequence(2) = 1;
for i = 3:n
fib_sequence(i) = fib_sequence(i-1) + fib_sequence(i-2);
end
end
% Calculate the golden ratio using Fibonacci sequence
n = 20; % Number of Fibonacci terms to generate
fib_seq = fibonacci(n);
% Calculate the ratio of consecutive Fibonacci numbers
golden_ratio_approximations = fib_seq(3:end) ./ fib_seq(2:end-1);
% Display the approximations of the golden ratio
disp('Approximations of the golden ratio using Fibonacci sequence:');
disp(golden_ratio_approximations);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!