How do you know if a call to "writetable" is successful?

조회 수: 1 (최근 30일)
Douglas Anderson
Douglas Anderson 2022년 9월 9일
댓글: Douglas Anderson 2022년 9월 10일
Hello,
I'm sure that this is elementary, but what indicates that a function call that doesn't have an output proceeded properly? Like that "writetable()" actually did write as designed? The old "xlswrite" had a status output. Why doesn't writetable have that?
I guess the same question would be valid for "print".
Thanks!
Doug Anderson

채택된 답변

Walter Roberson
Walter Roberson 2022년 9월 9일
An error condition would be generated if writetable() or save() fail.
Exceptions:
  • if the operating system or file system messes up and accidentally writes incorrectly data then you might not get an error message: they might believe that it worked when instead it created a mess
  • if the file is being written to a network file system then it is not completely certain that an error will always be reported.
  댓글 수: 3
Walter Roberson
Walter Roberson 2022년 9월 10일
Use try/catch
Douglas Anderson
Douglas Anderson 2022년 9월 10일
Once again, Walter, thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by