We call this as Script or function
Mostrar comentarios más antiguos
Function has input and output. If it is only has input or only has output, we called this script or still function?
Respuesta aceptada
Más respuestas (1)
per isakson
el 19 de En. de 2016
A script operates in the workspace of the caller, e.g. the base workspace. It may use existing variables and may create new variables - in the workspace of the caller.
A function operates in its own workspace. A declaration statement, ... function(...), must be the first executable line of the function. It may have input and/or output arguments, or no arguments, e.g
function HelloWorld()
disp('Hello world')
end
1 comentario
matlabgeek
el 19 de En. de 2016
Categorías
Más información sobre Variables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!