Creating user defined commands in Matlab
Mostrar comentarios más antiguos
I have written a customized plot and print functions for my use. They are simple user defined functions in m-file format.
Now can I use them as matlab command? i.e., I want to be able to call them without putting the m-files in all the working directories.
It is apparent that I should put the m-file in some standards directory in matlab program files. Please help.
Respuestas (2)
David Sanchez
el 5 de Jul. de 2013
2 votos
Copy all your m-files to a directory. Then go to the upper left corner of MATLAB layout. Then, click on File -> Set Path. Choose the folder where you placed your m-files/commands. And that's it. You can use your commands from anywhere.
1 comentario
Saptarshi Roy
el 5 de Jul. de 2013
Walter Roberson
el 5 de Jul. de 2013
1 voto
You should add the directory to the MATLAB path, using pathtool
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!