I'm using Matlab 7.0. How can I call a function? "File/New/Function" is missing.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Übel
el 25 de Oct. de 2014
Respondida: Zoltán Csáti
el 25 de Oct. de 2014
Or should I write an .m file instead beginning with:
function F = magic(x)
...
end
?
0 comentarios
Respuesta aceptada
Stalin Samuel
el 25 de Oct. de 2014
you need to create a .m file .And the file name must same as the function name
0 comentarios
Más respuestas (3)
Zoltán Csáti
el 25 de Oct. de 2014
The syntax of writing a function is what you have written. When you want to call it, do
out = magic(in)
Be careful though, magic is a function that already exists.
0 comentarios
Zoltán Csáti
el 25 de Oct. de 2014
Not a problem. It is just a help for you so that MATLAB creates a sample in advance. I never use this feature because it is not cumbersome to type function.
0 comentarios
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!