Read points from a txt file
Ältere Kommentare anzeigen
Hello everyone, i want to read point from a txt file and hold them in two variables x,y...the file txt has the following pattern x1 y1 i.e
x2 y2
1 Kommentar
jonas
am 15 Nov. 2018
upload the file
Antworten (1)
madhan ravi
am 15 Nov. 2018
Bearbeitet: madhan ravi
am 15 Nov. 2018
T=readtable('sample.txt'); %see attached file
datas=table2array(T);
x=datas(:,1)
y=datas(:,2)
3 Kommentare
Kosmas Kyriakopoulos
am 15 Nov. 2018
madhan ravi
am 15 Nov. 2018
or you want this:
T=readtable('sample.txt')
X=T.Var1
Y=T.Var2
see attached file in this comment
jonas
am 15 Nov. 2018
"i want in two variables to save them .. "
And I wanted you to upload the file
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!