- Import data: D=xlsread('data.xlsx');
- Sort out the data w.r.t the conditions using logical indexing e.g.:
extract data based on certain range of other coloumn
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    TAPAS
 il 23 Apr 2020
  
    
    
    
    
    Commentato: Sulaymon Eshkabilov
      
 il 23 Apr 2020
            I have attached an xlsx file which have four coloumns the first two coloumn are latitude and longitude .I want to extract data based on the condition 102.7<=long<=105.2 and 30.6<=lat<=32.2.
0 Commenti
Risposta accettata
  Sulaymon Eshkabilov
      
 il 23 Apr 2020
        The answer is quite simple;
Lat = D(:,1);
Lon = D(:,2);
DN = D(:,3);
DE=D(:,4);
HD=D(:,5);
DD=D(:, 6);
Index =Lon>= 102.7 & Lon<=105.2 & Lat>=30.6 & Lat<=32.2;
DNnew=DN(Index);
DEnew = DE(Index);
etc.. etc.
3 Commenti
  Sulaymon Eshkabilov
      
 il 23 Apr 2020
				again use the indexing option around corner boundaries with <= and >=
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

