h(z)=2+10z​^-1+2.3z^-​2+3z^-3/1-​78z^-1-9z^​-2+59z^-3+​1-31z^-1+1​6z^-2+4z/1​-4z^-2-7z^​-2

조회 수: 1 (최근 30일)
Bilgee John
Bilgee John 2021년 10월 25일
편집: Image Analyst 2021년 10월 31일
help me to write code
  댓글 수: 3
Star Strider
Star Strider 2021년 10월 25일
Needs parentheses and multiplication operators —
z = tf('z', 'Variable','z^-1')
h = (2+10*z^-1+2.3*z^-2+3*z^-3)/(1-78*z^-1-9*z^-2+59*z^-3) + (1-31*z^-1+16*z^-2+4*z)/(1-4*z^-2-7*z^-2)
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.
I have no idea what is causing the ‘Invalid text character’ error. You need to solve that.
I tested the essential code with another transfer function, and it works correctly otherwise.
.
ALESSIO LEREDE
ALESSIO LEREDE 2021년 10월 31일
Maybe you can try to define this transfer function with the function poles and zeros if you have issues in this form

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2021년 10월 31일
Try this:
z = linspace(0, 5, 200);
num1 = 10 .* z .^ (-1) + 2 .* z .^ (-2) + 3 .* z .^ (-3);
denom1 = 1-78*z.^(-1)-9*z.^(-2)+59*z.^(-3);
num2 = 1 - 31 * z.^(-1) - 16*z.^(-2)+4*z.^(-3);
denom2 = 1 - 4*z.^(-1)-7*z.^(-2);
h = 2 + num1 ./ denom1 + num2 ./ denom2;
plot(z, h, 'b-', 'LineWidth',2)
xlabel('z', 'FontSize', 17)
ylabel('h', 'FontSize', 17)
yline(0, 'LineWidth', 2)
grid on;
  댓글 수: 1
Image Analyst
Image Analyst 2021년 10월 31일
편집: Image Analyst 2021년 10월 31일
Not sure if the last term in numerator 2 is 4*z or 4*z^(-3) because the image is chopped off there. Please check. Here is is for 4z
z = linspace(0, 3, 200);
num1 = 10 .* z .^ (-1) + 2 .* z .^ (-2) + 3 .* z .^ (-3);
denom1 = 1-78*z.^(-1)-9*z.^(-2)+59*z.^(-3);
num2 = 1 - 31 * z.^(-1) - 16*z.^(-2)+4*z;
denom2 = 1 - 4*z.^(-1)-7*z.^(-2);
h = 2 + num1 ./ denom1 + num2 ./ denom2;
plot(z, h, 'b-', 'LineWidth',2)
xlabel('z', 'FontSize', 17)
ylabel('h', 'FontSize', 17)
yline(0, 'LineWidth', 2)

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by