Error while using transfer function 'tf'
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Keerthik Dhivya
am 18 Nov. 2023
Kommentiert: Sam Chak
am 7 Dez. 2023
I tried different inputs as numerator and denominator to create a transfer function using 'tf' command, but my MATLAB leaves this message everytime: 'Incorrect number or types of inputs or outputs for function 'tf''. And this exact code runs perfectly in online MATLAB FYI. Any help is appreciated!
theta_hat = [-1.77627176214971;0.790085804375558;-0.0407175636083817;0.0479175052321617];
a1 = theta_hat(1); a2 = theta_hat(2); b0 = theta_hat(3); b1=theta_hat(4);
num=[b0 b1];den=[1 a1 a2];gz = tf(num,den);
0 Kommentare
Akzeptierte Antwort
Sam Chak
am 18 Nov. 2023
Please check if you have a user-defined function m-file with the same name as 'tf' that is saved in the current path.
which -all tf
13 Kommentare
Dyuman Joshi
am 7 Dez. 2023
Bearbeitet: Dyuman Joshi
am 7 Dez. 2023
That code checks whether a particular item is licensed or not.
Type "ver" in the command window and see if the Control System Toolbox is installed or not.
Sam Chak
am 7 Dez. 2023
@joseph timoney, If the Control System Toolbox is installed in your machine, you should see the tf.m file under the control folder. Also use ver as advised by @Dyuman Joshi.

ver
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

