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!