uigetfile

6 visualizzazioni (ultimi 30 giorni)
nsbd
nsbd il 6 Feb 2012
Modificato: Matt J il 1 Ott 2013
loading have in the same folder but fails to sub-folders , why ?
N.Horro = importdata(uigetfile);
tnhks
  2 Commenti
nsbd
nsbd il 6 Feb 2012
N.Horro = importdata(imgetfile);
going on in this way , but I did not like the style of representation.
Jan
Jan il 6 Feb 2012
What does "fail in subfolders" exactly mean? What do you try and which error message occurs?

Accedi per commentare.

Risposte (1)

Jan
Jan il 6 Feb 2012
The syntax importdata(uigetfile) catchs only one output from uigetfile. To specify the path, you need to catch the 2nd output also:
[FileName, FilePath] = uigetfile;
if ~ischar(FileName)
disp('User aborted file input.');
return;
end
N.Horro = importdata(fullfile(FilePath, fileName));

Categorie

Scopri di più su Dialog Boxes in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by