Filter löschen
Filter löschen

fopen error

1 Ansicht (letzte 30 Tage)
Jason
Jason am 23 Mär. 2011
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.

Antworten (1)

Walter Roberson
Walter Roberson am 23 Mär. 2011
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.

Kategorien

Mehr zu Low-Level File I/O finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by