フィルターのクリア

no output file from compiled gui

1 回表示 (過去 30 日間)
Malgorzata Florek
Malgorzata Florek 2016 年 3 月 18 日
編集済み: Jan 2016 年 3 月 19 日
Hello, I created (in matlab 2015b) a gui that performs some fitting and in the end creates output text file with parameters, the source code of this part is more or less like that:
[fn, pathname] = uiputfile('*.par', 'Name output *.par file');
FID =fopen(sprintf('%s', fn),'wt');
fprintf(FID, 'headers\n');
fclose(FID);
save(fn, 'parsmono', '-ascii', '-append');
The gui works fine in matlab, but stopped after deployment to windows standalone app. There is no output file after performing the operation, however it seems as if it was created and deleted afterwards. Running app as an administrator didn't help. The problem happened on two computers, on two others it was fine. Do you have any suggestions what may be wrong?

回答 (1 件)

Jan
Jan 2016 年 3 月 19 日
編集済み: Jan 2016 年 3 月 19 日
Do not omit the important pathname:
[fn, pathname] = uiputfile('*.par', 'Name output *.par file');
File = fullfile(pathname, fn);
FID = fopen(File, 'wt');
fprintf(FID, 'headers\n');
fclose(FID);
save(File, 'parsmono', '-ascii', '-append');

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by