Problem in compiled app loading text, works in Matlab environment
Ältere Kommentare anzeigen
Not sure what I'm doing wrong. This works fine when running in Matlab, but my compiled application throws an error:
"Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier."
The offending line is the last line in the code below. Thanks for any suggestions!
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
myfile=uigetfile('*.txt', 'Pick a Text file');
fid = fopen(myfile,'r'); %# Open the file
data = textscan(fid,'%s %s %s','CollectOutput',true); %# Read the data as strings
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!