Borrar filtros
Borrar filtros

excel data into a single columns using loop

2 visualizaciones (últimos 30 días)
LIM JIAXIN
LIM JIAXIN el 30 de Sept. de 2018
Comentada: ANKUR KUMAR el 1 de Oct. de 2018
Does anyone know how to make this data into a single columns with spacing interval using for loop? from top data to bottom data
.
  2 comentarios
LIM JIAXIN
LIM JIAXIN el 30 de Sept. de 2018
Hi stephen, the answer provided by the link doesnt help. maybe you can help me?

Iniciar sesión para comentar.

Respuesta aceptada

ANKUR KUMAR
ANKUR KUMAR el 30 de Sept. de 2018

What do you mean by equal spacing between each column. You cannot keep blank any element in matrix. You can do in cell. Here is an example.

A=xlsread('example.xlsx')
reshape(A,[],1) %if you want without keeping blank between each column
B=arrayfun(@(x) num2str(x) , A,'uni',0);
C=[B';{'','','';'','',''}];
reshape(C,[],1)
  12 comentarios
LIM JIAXIN
LIM JIAXIN el 1 de Oct. de 2018
 https://www.dropbox.com/s/ee9sfwk6z15ntkk/example.xlsx?dl=0 the excel file is inside the link as i reached the limit of uploading files right now. So my input is under sheet 1 and the desired output can be seen from sheet 2.
ANKUR KUMAR
ANKUR KUMAR el 1 de Oct. de 2018
A=xlsread('example.xlsx')
A(2,:)=[];
reshape(A,[],1) %if you want without keeping blank between each column
B=arrayfun(@(x) num2str(x) , A,'uni',0)
C=[B;{'','','';'','',''}];
reshape(C,[],1)

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by