Borrar filtros
Borrar filtros

removing rows in a loop of excel

1 visualización (últimos 30 días)
Tian Tian
Tian Tian el 15 de Feb. de 2018
Editada: Birdman el 15 de Feb. de 2018
Hi, I want to compare paired excels in a folder. In the loop, i hope to select rows with columnB similar to previous one.
for i=1 : LengthB1 % B1 is the columnB from excel1
for j=1 : LengthB2 %B2 is the columnB from excel2
cellB1(i)=columnB1(i,1);
cellB2(j)=columnB2(j,1);
if cellB2(j)<=cellB1(i)*1.5 & cellB2>=cellB1*0.5
na=na+1
My questions are: 1) for i=1, j=5 and 10 both are good, but i want to get only one with the closest distance from B2 to B1 from j ; 2) for i=1, if j=5 is selected, then for i=2, i hope the loop of j can skip j=5. Can anyone give me a hand? Many thanks in advance.

Respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by