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.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de Feb. de 2016

4 votos

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

7 comentarios

Aurore Lecharlier
Aurore Lecharlier el 16 de Feb. de 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 el 16 de Feb. de 2016
Do I need to downlaod an extra toolbox (like e.g. Simulink) ? I apologize for my unknowledge, I use Matlab for academic purposes.
Walter Roberson
Walter Roberson el 16 de Feb. de 2016
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 el 3 de Jun. de 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 el 30 de Abr. de 2021
Same problem with my MATLAB 2020a
Akella Kartik
Akella Kartik el 22 de Sept. de 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 el 27 de Sept. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Feb. de 2016

Comentada:

el 27 de Sept. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by