Question: Matlab Question ===================== Write a program to generate the first n terms in the sequence given by the difference equation x_(k+1) = 2.25x_k - 0.5x_(k-1),
Matlab Question
=====================
Write a program to generate the first n terms in the sequence given by the difference equation
x_(k+1) = 2.25x_k - 0.5x_(k-1),
with starting values
x_1 = 1/3, x_2 = 1/12.
Use n = 225 if you are working in single precision, n = 60 if you are working in double precision. Make a semilog plot of the values you obtain as a function of k. The exact solution of the difference equation is given by x_k = (4^(1-k))/3, which decreases monotonically as k increases. Does your graph confirm this theoretically expected behavior? Can you explain your results?
Hint: Find the General Sol. to the difference equation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
