Hello, I need help on questions related to MATLAB. for question 1, I got G(z) =
ID: 3582887 • Letter: H
Question
Hello, I need help on questions related to MATLAB. for question 1, I got G(z) = 1.44(0.9)^k - 1.44(0.4)^k . How to plot the impulse response using MATLAB from the answer I got from question 1?
1. Determine the impulse response of the unity-feedback system whose open-loop system is described by the difference equation y(k 2) 0.13y(k 1) 0.36y(k) 30.7r (k 1). 2. Use MATLAB to plot the impulse response of the overall system. List the set of MATLAB commands used. 3. Solve using MATLAB and repeat for open-loop gains of K 0.1 and K 10 4. Compare and comment on the resultsExplanation / Answer
We have given a function g(z)= 1.44(0.9)^k - 1.44(0.4)^k where k lies between 0.1 and 10 .We can plot the impulse result using the MATLAB Statement Plot. We have to plot the response for value of 0.1 to 10 so we can use the loop as for k=0.1:10. First statement of the code is used to define the line specification using linespac which will crate the lines from 0 to 100 by stpe value of 1.
% Script to plot the response for given function G(z)=1.44(0.9)^k - 1.44(0.4)^k
% Statement to specify the line
x= linspace(0,1,100);
% loop to vary the values of k from 0.1to 10
for k=0.1:10
%function to calculate the G(z)
y =(1.44*(0.9)^k) - (1.44*(0.4^k))
%plot the response of Impulse
plot(x,y)
% terminating the for loop
end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.