Effacer les filtres
Effacer les filtres

removing rows in a loop of excel

1 vue (au cours des 30 derniers jours)
Tian Tian
Tian Tian le 15 Fév 2018
Modifié(e) : Birdman le 15 Fév 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.

Réponses (0)

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by