Receiving error "Unrecognized function or variable 'tf'" even though I have the Signal Processing Toolbox installed.
이전 댓글 표시
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
Matthew Crain
2021년 6월 6일
Brian Mcnulty
2022년 4월 18일
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.
답변 (1개)
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.
카테고리
도움말 센터 및 File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!