Question

Write and upload a MATLAB script to do the following. Compute the sequence S(n+1) = (2...

Write and upload a MATLAB script to do the following.

Compute the sequence S(n+1) = (2 – K) S(n) – S(n-1) ;   Assume S(1) = 0, S(2) = 1;

(a)    Case 1, Assume K = 1

(b)    Case 2, Assume K = 2

(c)     Case 3, Assume K = 4

Plot all of these on the same plot, for N = 1 to 20

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence....
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence. Plot its magnitude and phase. You can use the dtft command and use the abs, angle and plot commands to plot the results. x(n) = {4, 3, 2, 1, 2, 3, 4}. 2. Analytically determine H(z) and plot its magnitude and phase for the following system using freqz. y(n) = 2x(n) + x(n ? 1) ? 0.25y(n ? 1) + 0.25y(n ? 2). 3....
Write Matlab script to plot the spectrum (-? to ? radians) of DTMF signal for keys...
Write Matlab script to plot the spectrum (-? to ? radians) of DTMF signal for keys 1, A and B. Choose an appropriate sampling frequency. The DTMF frequencies are indicated in table 1.     Critically analyze the design specification.                                           Row/column 1209HZ 1336Hz 1477HZ 1633HZ 697 1 2 3 A 770 4 5 6 B 852 7 8 9 C 941 * 0 # D     Write Matlab script to plot the spectrum (-? to ? radians) of DTMF signal for...
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for...
Using MATLAB or Octave, use documenting code to Write a script that prompts the user for an integer between 0 and 9999, inclusive. The script should then calculate the digit in each of the 1000’s, 100’s, 10’s, and 1’s place of the number. Create a variable for each of the 4 extracted digits. For example, if your variables are named nThousands, nHundreds, nTens, and nOnes, then, in the case of 9471, they would be end up being set to 9,...
1. Write a MATLAB script, by hand, on this page, that calculates the nth degree Taylor...
1. Write a MATLAB script, by hand, on this page, that calculates the nth degree Taylor expansion of cos x and then compares the plot of this expansion to the original function. In one of your first lines, you may fix n (e.g., n = 6) but the remainder of the code should refer to n.
Write as a MatLab script For X=0 ~ 2π with intervals of π/100 use the following...
Write as a MatLab script For X=0 ~ 2π with intervals of π/100 use the following equations Y4=sin(X), Y5=sin(X-0.25), Y6=sin (X-1.5), Y7=sin(X-0.85), Y8=sin(X)sin(X+0.75) a. Plot Y4 and Y8 in the same plot using the hold on/off. Add title, labels. Plot them with different colors and line styles b. Plot Y5 × Y6 and Y8 in the same plot without using the hold on/off. Add title, labels. Plot them with different colors and line styles c. Plot one of the Y...
Write a matlab script file to solve the differential equation dy/dt = 1 − y^3 with...
Write a matlab script file to solve the differential equation dy/dt = 1 − y^3 with initial condition y(0)=0, from t=0 to t=10. matlab question
Write a Matlab script that plots the following functions over 0 ≤ x ≤ 5π: f1(x)...
Write a Matlab script that plots the following functions over 0 ≤ x ≤ 5π: f1(x) = sin2 x − cos x, f2(x) = −0.1 x 3 + 2 x 2 + 10, f3(x) = e −x/π , f4(x) = sin(x) ln(x + 1). The plots should be in four separate frames, but all four frames should be in one figure window. To do this you can use the subplot command to create 2 × 2 subfigures.
1- Create a new script that is called HW9.m and save it. The script will do...
1- Create a new script that is called HW9.m and save it. The script will do the following. Test your code for each of the cases and upload your script as a .m file. [15 points] a. Create a random integer numbers that goes from 0 to 5 and assign it to a variable y using rand and round commands. Hint: Note that rand function only creates random number between 0 and 1. You need to scale the values to...
Given: function f = fibonacci(n) % FIBONACCI Fibonacci sequence % f = FIBONACCI(n) generates the first...
Given: function f = fibonacci(n) % FIBONACCI Fibonacci sequence % f = FIBONACCI(n) generates the first n Fibonacci numbers. f = zeros(n,1); f(1) = 1; f(2) = 2; for k = 3:n f(k) = f(k-1) + f(k-2); end AND function f = fibnum(n) if n <=1 f =1; else f = fibnum(n-1) + fibnum(n-2); end In Matlab, modify fibonacci.m and fibnum.m to compute the following sequence. dn = 0, n<=0 d1 = 1, d2 = 1 and, for n >...
Using the Script: function EulerMethod1(n) X = 0 : 1/n : 1 ; Y = zeros(...
Using the Script: function EulerMethod1(n) X = 0 : 1/n : 1 ; Y = zeros( 1, n + 1 ) ; Y(1) = 1 ; for k = 1 : n m = Y(k) ; Y(k + 1) = Y(k) + m*( X(k + 1) - X(k) ) ; end clf plot( X, Y ) Create a new script, which defines the function EulerMethod2. The purpose of EulerMethod2 is to use Euler's Method to approximate the solution to the...