Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

is this a problem with the file?

1 vue (au cours des 30 derniers jours)
suganya s
suganya s le 21 Août 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
here the screen shot,tell me what is problem?

Réponses (1)

Walter Roberson
Walter Roberson le 21 Août 2015
You used dir() against a directory and then tried to open a file name you saw in the directory without including the directory in the file name to open.
You should use a code structure similar to:
projectdir = 'E:\scorpioncensus\reports';
dinfo = dir( fullfile(projectdir, '*.txt') );
for K = 1 : length(dinfo)
thisfile = fullfile(projectdir, dinfo(K).name);
fid = fopen(thisfile, 'rt');
data = textscan(fid, '%f%f%f');
fclose(fid);
... do something with the data
end

Cette question est clôturée.

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by