Hi, is there any way to check a status of the csvread function ? I am using guide in matlab, I would like to check if there is an error after reading a file to make an error message.
Thank you.

답변 (1개)

Guillaume
Guillaume 2016년 5월 3일

0 개 추천

Wrap the call to csvread in a try ... catch block:
try
m = csvread('somefile.txt');
catch exception
fprintf('Failed to read csv file because %s', exception.message);
end

댓글 수: 1

HD
HD 2016년 5월 4일
Hi Guillaume, this is not working. Is it because I am using guide ?
Thank you

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

카테고리

태그

질문:

HD
2016년 5월 3일

댓글:

HD
2016년 5월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by