MATLAB HELP. The first picture is the question I am trying to answer ONLY b. The
ID: 3676941 • Letter: M
Question
MATLAB HELP. The first picture is the question I am trying to answer ONLY b. The second photo is what I have written so far for b. The issue is that for some reason there is a error with value = value+get_fib(k). I can't figure out how to fix this. How would I make the get_fib function in a scrip estimate the Fibonacci constant 3.360? The third photo is also the function get_fib that I previously made as reference( this function works and was able to find Fibonacci corresponding term).Problem 3 (20 pts) Looking closely at the infinite series it would be reasonable (and corect) to conclude that it diverges. However, it may be surprising that the similar infinite series does not diverge, instead converging to a number (albeit irrational): 1645. In similar fashion, when reciprocals of the factorials are added together, they also produce a series that converges to an important (and irrational) number with which you are probably familiar: e (Euler's number). =stst.. +-+-+-..=e n!1 1 26 24 2.718 Another convergent series is that of the reciprocals of the Fibonacci numbers, which sum to produce another irrational number called the reciprocal Fibonacci constant, or . (As an aside, note that the Fibonacci series-and thus v-are intimately related to the golden rutio, ~ 1.61803.) (a) Write a MATLAB script named PP1 P3a that calls your function get fac to estimatee (b) Write a MATI AR script named PPI P3bthat calls your function get fib to estimate . Your estimates must be to at least 10 decimal places. (Hint: You'll need to set a tolerance in each script to determine when to finish refining its estimate and exit the loop.)
Explanation / Answer
So, try to change the code as below:
remove k >= 0 ;
use this code
while k >= i
F ( i ) = get_fib ( i - 1 ) + get_fib ( i - 2 ) ;
then remaining will be same.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.