Undefined function 'trapmf' for input arguments of type 'double'.

Hi, I used the functions trapmf and trimf in a code for designing a fuzzy controller, and they worked.
Err_X=[-75:1:75]; %% Universe
NB=trapmf(Err_X,[-75 -75 -40 -10]);
Then, I downloaded NI Elvis software for myDaq, and now I run the same code, but it says undefined. I tried this
which trapmf
C:\Program Files\MATLAB\R2016a\toolbox\fuzzy\fuzzy\trapmf.m % Has no license available
This is wierd because my matlab license has not expired yet, and I also have fuzzy toolbox 30 day trial, and it has not expired yet, and it is not working either even though when I use the command ver, I see the toolbox. I also typed path in command windows and I found this
C:\Program Files\MATLAB\R2016a\toolbox\fuzzy\fuzzy
I went to this directory and I found trapmf and trimf files there and I could open them.
I searched online for a solution, and some people talked about the file directory, and I have the script file in matlab directory.
Could you please help me solve this issue. Thanks

Respuestas (2)

From what you have described, it does appear that your trial has expired, or at least MATLAB registers that the trial has expired. This is another post related to your same issue:
If you are certain that your trial has not expired, you could try to the following commands:
restoredefaultpath
rehash toolboxcache
Try your script again. If that resolves the issue, then execute
savepath
You could also try Home > Help > Licensing > Update Current Licenses or Manage Licenses to see if your trial for the Fuzzy Logic Toolbox is still active.

2 comentarios

Simon
Simon el 19 de Abr. de 2017
Editada: Simon el 19 de Abr. de 2017
I tried these commands, but they did not solve the problem. Then, I copied the files of fuzzy toolbox and the script to desktop, and they worked. Then, matlab stopped working two days later, and I could not even do 5+5. Every time I run a script 5+5, it says undefined, but I could do 5+5 in the command window. Finally, I uninstalled matlab and installed it again, and that solved the issue. Thank you for your answer.
Glad you got it working now. I have posted an Answer below for others to see if they have the same issue.

Iniciar sesión para comentar.

Sam McDonald
Sam McDonald el 19 de Abr. de 2017
Installation of thrid-party software may have currupted the MATLAB installation. A re-installation of MATLAB solves this issue

Categorías

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

Preguntada:

el 15 de Abr. de 2017

Comentada:

el 19 de Abr. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by