So I am trying to get a textfile onto matlab and define a matrix. I copied and pasted it onto the current folder in the name window next to the command window. In the command I put A=dlmread('file') but it keeps on giving me a cannot find file.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
A=dlmread('file') Error using dlmread (line 62) The file 'channel_AVG_Gly_3.5ul_min_particlt_.5ul_min_01.txt' could not be opened because: No such file or directory
0 Kommentare
Antworten (1)
Marc Jakobi
am 10 Okt. 2016
Bearbeitet: Marc Jakobi
am 10 Okt. 2016
Try this:
pathname = 'path\to\file'; %path to the file
filename = 'file.txt'; %don't forget the file extension (.txt)
A = dlmread(fullfile(pathname,filename));
or
pathname = pwd;
filename = 'file.txt';
A = dlmread(fullfile(pathname,filename));
0 Kommentare
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!