Revise your assign05.m by adding the exist() function to print a message only if the data file is not available. The output should be the same as with assign05.m.
This is a question for an assignment I have, how would I do this? I don't really understand what she wants us to do

댓글 수: 1

Star Strider
Star Strider 2019년 3월 3일
Reading the documentation on the exist() function should help you understand.

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

 채택된 답변

Image Analyst
Image Analyst 2019년 3월 3일

0 개 추천

Hint:
if ~exist(filename............ % Use the 'file' option
% Alert user that the file is not found.
message = sprintf(............
uiwait(errordlg(...............
return;
end
That should be plenty for you to complete the assignment.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by