Question
I'm sure this is probably really simple but I can't seem to find it. I have a z transform transfer function, given from tf, and I have an input signal. What i need is to pass the signal though the system and get the output. This is a small excerpt from my very long code that is the part I am stuck on. if true % code %the signal N = 250; n = 0:1:N-1; x1 = 3*cos(20*pi*n/N); %the transfer function num = [0.3881 0.3881]; den = [1 -0.4452 0.2700 -0.0486]; fs = 1/250; hz = tf(num, den, fs) end Any help or direction would be greatly appreciated.
Expert Answer
Prashant Kumar
PhD Expert
Answered Aug 14, 2026
You can use lsim function
N = 250; n = 0:1:N-1; x1 = 3*cos(20*pi*n/N); num = [0.3881 0.3881]; den = [1 -0.4452 0.2700 -0.0486]; fs = 1/250; hz = tf(num, den, fs) [y,t]=lsim(hz,x1) stem(t,y)
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related transfer function Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →