Hi, in Matlab R2015b, I used the commando ' tf ' for the transfer function. When I run the script where I used it, I get an error message ' undefined function or variable 'tf' '. How do we get or create this function 'tf' ? I thought it was an inherent function of matlab. Thank you.

 채택된 답변

Walter Roberson
Walter Roberson 2016년 2월 16일

4 개 추천

http://www.mathworks.com/help/mpc/ref/tf.html Model Predictive Control Toolbox
You need one of those three.

댓글 수: 7

Aurore Lecharlier
Aurore Lecharlier 2016년 2월 16일
Dear, Thank you. I however still don't manage to use the tf function. Here is my script (see annexe)
Aurore Lecharlier
Aurore Lecharlier 2016년 2월 16일
Do I need to downlaod an extra toolbox (like e.g. Simulink) ? I apologize for my unknowledge, I use Matlab for academic purposes.
The syntax you are using indicates that you expect to be using the Control System Toolbox. You need to have that optional toolbox installed and licensed. If the command
which tf
shows you a tf function but indicates "no license available" then you have the software installed but no license for it. If the command
ver
shows you the Control System toolbox but "which" said it did not exist, then you have a license for it but do not have it installed. If it did not show up for "which" or "ver" then you do not have it installed and you do not have it licensed.
If you are using an Academic license then it is possible that your institution has already arranged licenses for you; you would need to check with your IT people about that. If you are already licensed then you should go back to the MATLAB installer and request to install the toolbox (it is not installed by default.)
Evan Zhang
Evan Zhang 2020년 6월 3일
Hi, I'm having a similar issue in Matlab 2020a, where
which tf
returns 'tf' not found
but
ver
shows that both dsp toolbox and signal processing toolbox are installed. I have even found a tf.m file in the toolbox files, but it appears to be only comment where the code should be.
Petar Vukovic
Petar Vukovic 2021년 4월 30일
Same problem with my MATLAB 2020a
Akella Kartik
Akella Kartik 2021년 9월 22일
I have the isseu in 2021a as well. I installed both Signal Processing Toolbox and the DSP System Toolbox, but still I get this:
Unrecognized function or variable 'tf'. for tf and
'tf' not found. for which tf
Jerry Maravilla
Jerry Maravilla 2021년 9월 27일
Try the control system tool box. If that doesn't work you can just use matlab's online editor. Doesn't fix the issue but you'll be able to run your code.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by