フィルターのクリア

compiling GUI with folder of input text files

1 回表示 (過去 30 日間)
hana
hana 2011 年 8 月 24 日
I've compiled a Gui that has a folder containing input txt files. I did include that folder unmder "other files" when I made the package, but for some reason, I can't reach it in the compiled version. all suggestions/ ideas are welcome

回答 (2 件)

Friedrich
Friedrich 2011 年 8 月 25 日
Hi,
the path management in deployed applications is different than in MATLAB. I would recommend reading this:

hana
hana 2011 年 9 月 20 日
I did read this article & can see that path management is different in compiled files; however I’m not sure how to fix my problem yet. Here is some more detail: I’ve compiled this fairly complex Gui that is using txt formatted input files to operate and saves other txt files in different stage of processing in different folders. I’ve included all subfolders in the main folder that I have all the other Gui functions. I’ve compiled the main Gui with the rest of functions/subfolders as it’s “other files”. Now my compiled Gui is not operating properly once I want to choose an input file. It doesn’t even open the uigetfile dialog!! . This is a sample of what I’m using to open a file in the original Gui:
[stat, mess]= fileattrib ('PF_open'); %[PF_open is the subfolder containing input txt files
folddir = mess.Name;
[filename, pathname] = uigetfile('*.txt', 'Pick a PF.file', folddir);
if isequal(filename,0)
disp('User selected Cancel')
else
disp(['User selected', fullfile(pathname, filename)])
cd(folddir);
fid = fopen(filename,'rt');
[ AA,DOFMC1b,DOFMC2b,DOFSC1b,DOFSC2b,DOFSC3b,DOFSC4b ]=...
textread(filename,'%s%f%f%f%f%f%f');
[ AAFP,DOFMC1bFP,DOFMC2bFP,DOFSC1bFP,DOFSC2bFP,DOFSC3bFP,DOFSC4bFP ]=...
textread(filename,'%s%f%f%f%f%f%f');
cd(handles.currentfold);
handles.AA=AA;
handles.DOFMC1b=DOFMC1b;
.
.
.
As you see I’m using “cd”,” fileattrib” to switch btw folders/directories. I have even tried with a far simpler Gui and added the path to sub-folders to the main mother directory & then compiling it. But that didn’t work either. I’d appreciate any help.

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by