Nevermind! I found that I needed the Control Systems Toolbox add-on. Apparently the tf function is not a part of the Signals Processing Toolbox. The more you know!
Receiving error "Unrecognized function or variable 'tf'" even though I have the Signal Processing Toolbox installed.
38 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to produce a bode plot using the tf function. My code is as follows:
num = [10000000000000000000000000000 7000000000000000000000000000000];
den = [1 7540690 21324854073600 26807731666619904000 12647107451415440994336768 10730685839764156310146252800];
G = tf(num, den)
bode(G),grid;
The error is in line 4. I am receiving the error message despite having the Signal Processing Toolbox installed. When I type "ver" into the command window I get this:
MATLAB Version: 9.10.0.1669831 (R2021a) Update 2
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19042)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.10 (R2021a)
Signal Processing Toolbox Version 8.6 (R2021a)
I am new to MATLAB so I would appreciate any pointers. Thank you.
2 comentarios
Brian Mcnulty
el 18 de Abr. de 2022
the 'tf' command is not recognized and the command window provides a reccomendation instead.

I have all the correct toolboxes installed, however, the error persists.

What can I do to alleviate this issue. Any suggestions would be greatly appreciated. Thank you in advance.
Respuestas (1)
Steven Lord
el 6 de Jun. de 2021
which -all tf
There are several functions named tf in various MathWorks products, but most of them are intended for use in converting some sort of other object into a tf object. As you have learned the tf function in Control System Toolbox (the first on that list) is what you should use for creating a tf object from raw numeric data.
0 comentarios
Ver también
Categorías
Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!