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

Respuestas (1)

madhan ravi
madhan ravi el 15 de Nov. de 2018
Editada: madhan ravi el 15 de Nov. de 2018

0 votos

T=readtable('sample.txt'); %see attached file
datas=table2array(T);
x=datas(:,1)
y=datas(:,2)

3 comentarios

Kosmas Kyriakopoulos
Kosmas Kyriakopoulos el 15 de Nov. de 2018
i want in two variables to save them ..
madhan ravi
madhan ravi el 15 de Nov. de 2018
or you want this:
T=readtable('sample.txt')
X=T.Var1
Y=T.Var2
see attached file in this comment
jonas
jonas el 15 de Nov. de 2018
"i want in two variables to save them .. "
And I wanted you to upload the file

Iniciar sesión para comentar.

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Nov. de 2018

Comentada:

el 15 de Nov. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by