Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to use these codes in octave but some of the commands are from Matlab so they won't work in octave. For example

I am trying to use these codes in octave but some of the commands are from Matlab so they won't work in octave. For example the tf command on line 3, the z command and also the H is not being recognized.

clear all

clr

H=tf([1 -1 -2],[1 1.5 -1],1);

poles_H=roots([1 1.5 -1])

syms (z)

Y(z)=(z/(z-1))*((z^2-z-2)/(z^2+1.5*z-1))

y_n=iztrans(Y)

n=0:1:6;

y_n_7=double(subs(y_n))

stem(n,y_n_7,'linewidth',2)

grid on

ylim([-20 40])

xlim([-1 7])

xlabel('Samples(n)')

ylabel('Value')

title('First 7 samples of step response')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions