data from first line to two column
Mostrar comentarios más antiguos
I have data.txt. There is lot of numbers, in this format (1.4282E-01, 5.0537E+00, 1.2573E-01, 5.0537E+00, 1.8311E-02, 5.0513E+00,...n) all is in one line.
I need transform:
1.4282E-01, 5.0537E+00,
1.2573E-01, 5.0537E+00,
1.8311E-02, 5.0513E+00,
.
.
.
n
I write this code, but calculate is very long and not end.
data.txt
A=data;
n=643968;
index_i=1:2:n;
index_j=1:1:n/2;
for i=index_i;
j=index_j;
B(j,1)=A(1,i);
end
??? I need A(1,1)=B(1,1); A(1,3)=B(1,2); A(1,5)=B(1,3);
please help me
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!