Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in matlab, please help with this quick function function ratio - myGoldenRatioIterative (m) Type Description 1x1 double A positive integer Input m Output ratio 1x1
in matlab, please help with this quick function
function ratio - myGoldenRatioIterative (m) Type Description 1x1 double A positive integer Input m Output ratio 1x1 double The meh Golden Ratio Golden Ratio Formula In geometry, a golden spiral (shown in the following image) is a logarithmic spiral whose growth factor is 4, the golden ratio. That is, a golden spiral gets wider (or further from its origin) by a factor of up for every quarter turn it makes 1/02 1/03 0 To approximate the golden spiral, you can start with approximating the golden ratio p. One method to approximate the golden ratio y is using the ratio between consecutive elements in a special F array. The approximation will approach the golden ratio as the length of the Farray approaches infinity First, let's define the special F array. The kith number F(k) is defined as such: F(1) = 1, F(2) - 1, and F(k) = F(k-1) + F(k - 2) for k > 2. For example F(3) = 2, F(4) = 3 and F(5) = 5. m 2 1, where F(m) is the mi element in Next, let's define the mh Golden Ratio to be (m) = the F array. Use an iterative method to calculate the golden ratio of a given positive number m according to the above rule. You will need to calculate F(m) and F(m + 1) before you calculate the golden ratio Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started