- #1
pags920
- 21
- 0
I am trying to use MATLAB to obtain a transfer function, for my Controls class. I will be honest, I have no experience using MATLAB, but our professor insists on us using it to find the transfer function. MATLAB is not a prerequisite for this class. Before I start attempt to find my transfer function, I wanted to make sure I can run the function first. I am having trouble using it. Below is my code that I have on my .m file.
When I run this .m file, I get the following error:
Can anyone help an inexperienced MATLAB user?
Code:
A=[0 500; -3.3333 -33.3333]
B=[0; 3.3333]
C=[1 0]
D=[0]
[NUM,DEM]=ss2tf(A,B,C,D,1)
When I run this .m file, I get the following error:
Code:
? Attempt to execute SCRIPT ss2tf as a function.
Error in ==> ss2tf at 6
[NUM,DEM]=ss2tf(A,B,C,D,1)
Can anyone help an inexperienced MATLAB user?