Standalone application error
古いコメントを表示
Hi all,
I have this script that performs some calculations and then by command saves the data from the previous created .mat file to a .txt file. i have another script that is called when i press the "save" button in the GUI figure to save the .txt file. Now, my problem arises when i compile all this, in the standalone application when i press "save" it doesn't create the .txt file and returns an error sound.
This is my script for saving the data and that is called when "save" button is pressed:
file=get(handles.file_name,'string');
[~, name, ~] = fileparts(file);
j=load(name,'-mat');
txt= {'Longitudinal young modulus'};
tempfile = 'results.txt';
fid = fopen(tempfile,'w');
for i = 1:length(txt)
fprintf(fid,'%s\n',txt{i});
end
fclose(fid);
dlmwrite('results.txt', num2str(j.E1),'delimiter', '','roffset',1,'coffset',2,'-append');
Is anything in here that is not compilable?
Thank you
採用された回答
その他の回答 (1 件)
Titus Edelhofer
2011 年 11 月 17 日
1 投票
Hi,
assuming you are using Windows, I'd suggest to open a dos window (run "cmd" from Windows Start), navigate to where the .exe is and run the executable. Then you should see the error message of the application ...?
Titus
カテゴリ
ヘルプ センター および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!