run script from desktop shortcut vs command window
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I set up a shortcut icon on my desktop to execute the following -
C:\Program Files\MATLAB\R2016a\bin\matlab.exe" -nodesktop -nosplash -minimize -r matlabserial
Matlabserial.m opens a serial com port and reads NMEA data from a GPS receiver.
When I launch the shortcut everything opens and the script runs to the point where I look for data on the serial port. The script then times out with no data received.
If I type matlabserial in the Matlab command window the script executes without a problem.
I put a disp('looking') command right before the lines
data1 = fgetl(obj1); % GGA
data2 = fgetl(obj1); % ATT
when launched from the shortcut I get one response. When launched from the command window a response for every time it finds the lines of data on the serial port.
I checked the path and all my subdirectories and toolkits showup.
Is the desktop shortcut not allowing the serial ports to work?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!