loading have in the same folder but fails to sub-folders , why ?
N.Horro = importdata(uigetfile);
tnhks

2 commentaires

nsbd
nsbd le 6 Fév 2012
N.Horro = importdata(imgetfile);
going on in this way , but I did not like the style of representation.
Jan
Jan le 6 Fév 2012
What does "fail in subfolders" exactly mean? What do you try and which error message occurs?

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 6 Fév 2012

1 vote

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));

Catégories

En savoir plus sur App Building dans Centre d'aide et File Exchange

Tags

Question posée :

le 6 Fév 2012

Modifié(e) :

le 1 Oct 2013

Community Treasure Hunt

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

Start Hunting!

Translated by