Borrar filtros
Borrar filtros

What is status for?

12 visualizaciones (últimos 30 días)
chaos4u2
chaos4u2 el 26 de Feb. de 2013
Comentada: Walter Roberson el 5 de Sept. de 2021
I've read many codes that when calling a function it equals to status. Like this:
[status]=function(s)
What is the status for?

Respuesta aceptada

Jan
Jan el 27 de Feb. de 2013
Editada: Jan el 27 de Feb. de 2013
See movefile. Checking the status allows to check for errors:
[status,message,messageid] = movefile(File1, File2);
if ~status
warning(message)
end
Now a warning appears, but it could be an error also. E.g. the destination could be write protected.
Equivalent for mkdir. Here the use of the status and the messages is explained in the documentation also: doc mkdir.
  1 comentario
chaos4u2
chaos4u2 el 27 de Feb. de 2013
Thank you very much!!!

Iniciar sesión para comentar.

Más respuestas (2)

Doug Hull
Doug Hull el 26 de Feb. de 2013
To let you know the status, or output of the function. It varies based on each function. Read the doc for each function for details.
  1 comentario
chaos4u2
chaos4u2 el 27 de Feb. de 2013
Could you give me an example please, I don't see the difference between using it and don't using it. Thank you!

Iniciar sesión para comentar.


rajashekar chava
rajashekar chava el 5 de Sept. de 2021
status(1)=!
  1 comentario
Walter Roberson
Walter Roberson el 5 de Sept. de 2021
This is not valid syntax in MATLAB. The ! operation is only valid at the beginning of a command.

Iniciar sesión para comentar.

Categorías

Más información sobre Debugging and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by