Question
write a matlab code
Write a MATLAB function to check the stability of a digital filter described by its coefficients. Syntax: stable (b, a); wher
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Function script

function []=stable(b,a)

p=roots(a);

if abs(p)<1

disp('The system is stable')

else

disp('The system is unstable')

end

end

To call the above script

>>b=[2 1];

>>a=[1 -0.4 0.6];

>>stable(b,a);

The system is stable

>>b=[1 0.5 2];

>>a=[1 1 -1];

>>stable(b,a)

The system is unstable

Add a comment
Know the answer?
Add Answer to:
write a matlab code Write a MATLAB function to check the stability of a digital filter...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Don't use fplot command. Matlab code. Write out code please, don't make it a screenshot. 2....

    Don't use fplot command. Matlab code. Write out code please, don't make it a screenshot. 2. Use the subplot command to make two plots of the function f(x) = (x + 1)(x - 2)(2x – 0.25) - et one graph for 0 < x <3 and the other for 3 < x < 6. Use a logarithmic scale for the y-axis. Include a plot title (for each subplot), and label both aris(for each subplot).

  • are integers and 91 and 92 are 5. Consider the system diagram show in Fig. 2...

    are integers and 91 and 92 are 5. Consider the system diagram show in Fig. 2 for a digital filter. Assume N and M real-valued. (a) Use the diagram to write the difference equation that relates the input to the output. And use the difference equation to write the transfer function for the filter. No Matlab needed. (b) Assume N = 3, M = 5, 91 = 0.5 and 92 = 0.9. Write a Matlab function (call it "ece125filter”) that...

  • please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab:...

    please write code in MATLAB as well 5. (12 points) Create the following signal in Matlab: x[n] = u(n) - u[n-6] a. Mathematically compute yi[n] = x[n] * x[n] where * means convolution. Now use the conv command to perform the convolution. Graph x[n) and the resulting y(n), both over the interval Osns 20. How many non-zero terms does y(n) have? Does your computational result agree with the Matlab result? b. Repeat a. but this time with yz[n] = x[n]*h[n)...

  • A digital filter has the transfer function H(z) = ? -0.2 (2) Z(z - 0.7) a....

    A digital filter has the transfer function H(z) = ? -0.2 (2) Z(z - 0.7) a. Is the system stable? b. Find the output y[n] for the filter if the input is x[n] = (0.9)"u[n].

  • Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y =...

    Please show the code necessary, and explanations on MATLAB. Plotting 11) Plot the function y = sin(x) from x = 0 to 21. 12) Plot the functions y = x2 z = x2 + 2x + 1 from x = 0 to 2 on the same graph. Scripts: Input and Output 13) Write a script (M-file) to read in a message at the command line using the MATLAB input function and then display the message to the Command Window using...

  • 1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector...

    1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector containing the values of the integral (A) for n= 1,2,3,..., n. The function must use the relation (B) and the value of y(1). Your function must preallocate the array that it returns. Use for loop when writing your code. b) Write MATLAB script that uses your function to calculate the values of the integral (A) using the recurrence relation (B), y(n) for n=1,2,... 19...

  • integers between 5 and 400 Use MATLAB command windows to create a vector with all a)...

    integers between 5 and 400 Use MATLAB command windows to create a vector with all a) Ans) "deconv" Write a function integerdivision to divide two polynomials function using the command b) d) Write m-file to find the roots of the following linear equation using MATLAB x5 +2x -5x3 +7x2+12x +200 Ans) Questions 2 cover CLO2:/10 a) Write the output of the following MATLAB code >> A = [2,4,10,13:16,3,7,18; 8,4,9,25:3,12,15,171 >> length (A) >> size (A)

  • 3. Write a Matlab program that returns the n roots of a complex number. The function should have ...

    3. Write a Matlab program that returns the n roots of a complex number. The function should have z and n as inputs a nd returns y as theoutput 3. Write a Matlab program that returns the n roots of a complex number. The function should have z and n as inputs a nd returns y as theoutput

  • Please solve it with step by step MATLAB code, thank you! Suppose that a system is shown in Figure 2. Based on for loop, write a piece of MATLAB code to calculate the closed loop poles for 03K35 and...

    Please solve it with step by step MATLAB code, thank you! Suppose that a system is shown in Figure 2. Based on for loop, write a piece of MATLAB code to calculate the closed loop poles for 03K35 and plot the outputs where the poles are represented by "W" letter. Find the interval of K parameter for stability using Routh-Hurwitz method. Calculate the poles of the closed loop transfer function where K attains the minimum value such that the system...

  • Write a MATLab code for a function m-file that that can take three inputs (f, y,...

    Write a MATLab code for a function m-file that that can take three inputs (f, y, t) and uses a while loop to examine f(x) for x = y, x = y+2t, x = y+4t, ... until a number is larger than the previous value and returns the x value for which this happens. Notes: Assume that f is decreasing at x=y but that there is a cutoff x=b > y after which f starts increasing. Assume the input for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT