Effacer les filtres
Effacer les filtres

how to split a dataset based on values from one column

1 vue (au cours des 30 derniers jours)
James Oxborrow
James Oxborrow le 31 Août 2018
Modifié(e) : madhan ravi le 31 Août 2018
I have this dataset and want to split it into two data sets based on wether the values in the 7th column (etd) are >25 or <25. how would i go about doing this?

Réponse acceptée

madhan ravi
madhan ravi le 31 Août 2018
Modifié(e) : madhan ravi le 31 Août 2018
column7 = datasets(:,7)
for i = 1:numel(column7)
if column7(i) > 25
above25(i) = column7(i)
elseif column7(i) < 25
below25(i) = column7(i)
end
end
above25(above25==0)=[]
below25(below25==0)=[]
  4 commentaires
madhan ravi
madhan ravi le 31 Août 2018
Modifié(e) : madhan ravi le 31 Août 2018
Upload the data file to test.
James Oxborrow
James Oxborrow le 31 Août 2018
donn't worry, i figured it out. Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by