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.

 Réponse acceptée

Walter Roberson
Walter Roberson le 16 Fév 2016

4 votes

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

7 commentaires

Aurore Lecharlier
Aurore Lecharlier le 16 Fév 2016
Dear, Thank you. I however still don't manage to use the tf function. Here is my script (see annexe)
Aurore Lecharlier
Aurore Lecharlier le 16 Fév 2016
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 le 3 Juin 2020
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 le 30 Avr 2021
Same problem with my MATLAB 2020a
Akella Kartik
Akella Kartik le 22 Sep 2021
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 le 27 Sep 2021
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by