fopen error
조회 수: 1 (최근 30일)
이전 댓글 표시
so I got this error when I tried to fopen a USB port. The only fix for it was to restart the computer because for some reasons the toolbox in Matlab doesn't recognized any of the usb ports once you disconnect the cable. Anyway, my question is how can I code it so that when it gets an fopen error, a msgbox will pop up telling the user to restart the computer and reconnect. Anyway to acknowledge that fopen was successful or not? Thanks.
댓글 수: 0
답변 (1개)
Walter Roberson
2011년 3월 23일
You may be able to use a try/catch block for this. The first line of defense, though, is checking to see whether fopen returned -1.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!