error while using dlmread
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello
I am using dlmread to input data from .txt file. Actually file was having some character headers and texts. But as we cant use dlmread for file having texts in it. I deleted all the text in the file. So now there is only numerical data, 5rows and 12 coulumns. I want element which is at point 1st row and 10 th column. So the command I used is
a= dlmread('file name', '', [0 9 0 9])
But I am getting error as mismatch in file format and string.
What might be the reason?? Please reply soon. Urgent help required.
6 Kommentare
Fangjun Jiang
am 10 Sep. 2011
Is the hyphen used as the delimiter? If yes, use a=dlmread('filename,'-',[0 9 0 9]);
Antworten (1)
Fangjun Jiang
am 9 Sep. 2011
a=magic(12);
b=a(1,10)
dlmwrite('test.txt',a);
r=dlmread('test.txt',',',[0 9 0 9])
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets 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!