I've read many codes that when calling a function it equals to status. Like this:
[status]=function(s)
What is the status for?

 채택된 답변

Jan
Jan 2013년 2월 27일
편집: Jan 2013년 2월 27일

0 개 추천

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.

추가 답변 (2개)

Doug Hull
Doug Hull 2013년 2월 26일

0 개 추천

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

chaos4u2
chaos4u2 2013년 2월 27일
Could you give me an example please, I don't see the difference between using it and don't using it. Thank you!

댓글을 달려면 로그인하십시오.

rajashekar chava
rajashekar chava 2021년 9월 5일

0 개 추천

status(1)=!

댓글 수: 1

Walter Roberson
Walter Roberson 2021년 9월 5일
This is not valid syntax in MATLAB. The ! operation is only valid at the beginning of a command.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

질문:

2013년 2월 26일

댓글:

2021년 9월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by