Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
If you're tired of re-typing or re-copying the same header structure over and over, newFunction may be what you're looking for.
In the command window, call
newFunction myNewFunctionName
or
newFunction('myNewFunctionName')
First, newFunction checks for whether there already exists another function with the same name.
Second, an input dialog appears that requires you to enter a H1-line (one sentence description), and a synopsis (make sure you type the function name in the correct case! You can also already list explanations for input and output argument, and you can choose whether it'll be a function or a class.
Third, newFunction asks for the save directory for the function.
Fourth, newFunction creates the new function (or classdef) file with a header that includes the synopsis, the description of inputs and outputs (if provided), the Matlab version, the date and the name of the user who created the function.
Finally, newFunction opens the file in the editor and you're ready to go.
Citar como
Jonas (2026). Automatic template for new functions (https://la.mathworks.com/matlabcentral/fileexchange/27132-automatic-template-for-new-functions), MATLAB Central File Exchange. Recuperado .
Agradecimientos
Inspiración para: NEWFUNC | Create a new MATLAB function using a customizable template, Generate a new function m-file, with documentation, NewFile
Información general
- Versión 1.0.0.0 (3,57 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
| Versión | Publicado | Notas de la versión | Action |
|---|---|---|---|
| 1.0.0.0 |
