From: Maxx Chatsko on
Hello all,
When using uiputfile the default path displayed in the dialog box is always the current path in Matlab. Is there any way to specify the path/folder displayed in the dialog box inside of the uiputfile command? Or do I have to use addpath and path etc?
Thanks
Maxx
From: us on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i1i8e4$q5a$1(a)fred.mathworks.com>...
> Hello all,
> When using uiputfile the default path displayed in the dialog box is always the current path in Matlab. Is there any way to specify the path/folder displayed in the dialog box inside of the uiputfile command? Or do I have to use addpath and path etc?
> Thanks
> Maxx

one of the solutions
- add an abs path before the file ext spec...

ftyp=which('unique'); % <- just a folder...
ftyp=fileparts(ftyp); % <- path...
ftyp=[ftyp,filesep,'*.m'];
[fn,pn]=uiputfile(ftyp);

us
From: Maxx Chatsko on
"us " <us(a)neurol.unizh.ch>
> one of the solutions
> - add an abs path before the file ext spec...
>
> ftyp=which('unique'); % <- just a folder...
> ftyp=fileparts(ftyp); % <- path...
> ftyp=[ftyp,filesep,'*.m'];
> [fn,pn]=uiputfile(ftyp);
>
> us

How can I incorporate that into the following code? Or is there a better way now that I provided a more specific answer? :
[filename_edit,text_path,filterindex]=uiputfile({'*.spc','SPC File (*.spc)';...
'*.*','All Files (*.*)'},'Save Spectra');
ALSO, I have 3 checkboxes that will save 3 different types of spectra. I would like to incorporate the 3 different types on the end of the filename, but before the extension. Is there a way to do this with one dialog box or do I need 3 seperate dialog boxes?
My spectra types are swir={'_swir'} fci={'_fci'} rci={'_rci'}. I used these with strcat before I added a dialog box and they worked fine.
Thanks
Maxx
From: Maxx Chatsko on
> How can I incorporate that into the following code? Or is there a better way now that I provided a more specific answer? :
> [filename_edit,text_path,filterindex]=uiputfile({'*.spc','SPC File (*.spc)';...
> '*.*','All Files (*.*)'},'Save Spectra');
> ALSO, I have 3 checkboxes that will save 3 different types of spectra. I would like to incorporate the 3 different types on the end of the filename, but before the extension. Is there a way to do this with one dialog box or do I need 3 seperate dialog boxes?
> My spectra types are swir={'_swir'} fci={'_fci'} rci={'_rci'}. I used these with strcat before I added a dialog box and they worked fine.
> Thanks
> Maxx

Adding the acquisition type to the filename is more important to me than setting the path/folder. Anyone?