MATLAB Plotting Transfer Functions Using Matlab

AI Thread Summary
The discussion centers on using a Bode plot program in Matlab to plot transfer functions. The user is encountering an issue where the command for plotting results in an error indicating that "tf" is an unknown variable. They successfully calculated the zeros, poles, and gain using the tf2zp function but are struggling to plot the frequency response and bandwidth. The user is open to alternative methods or programs to achieve their goal, as they are unable to resolve the issues with the current program.
mpm
Messages
82
Reaction score
0
I am using a bode plot program using Matlab to try and plot transfer functions.

Here is the program I have:
http://www.swarthmore.edu/NatSci/echeeve1/Ref/Bode/BodePlotGui.html

Everytime I try and type in the command that it says to use, it gives me a tf is an unknown variable.

Does anyone know how I can get this to work?
 
Last edited by a moderator:
Physics news on Phys.org
I figured out how to get the zeros, poles, and gain by using this:

num = [2 3];
den = [1 4 0 5];
[z,p,k] = tf2zp(num,den)

But I can't figure out how to plot this to find the frequency response and bandwidth.

Note: I am just trying to find alternatives since I can't get this other program to work. Anything that works I will use.
 

Similar threads

Back
Top