Effacer les filtres
Effacer les filtres

Matrix reduction

1 vue (au cours des 30 derniers jours)
Jason
Jason le 29 Mar 2011
I have a very large set of data of over 1000 readings in [A]. I need to reduce the data to 101 readings evenly spaced over the original data set. Can anyone give me some help, or point me in the right direction? Any help would be much appreciated.

Réponse acceptée

Matt Fig
Matt Fig le 29 Mar 2011
If DAT is your original data.
NewDAT = DAT(round(linspace(1,length(DAT),101)))
  3 commentaires
Matt Tearle
Matt Tearle le 29 Mar 2011
NewDAT = DAT(round(linspace(1,length(DAT),101)),:)
Indexing in MATLAB is A(row,column). Using : in place of column gives all columns (for the specified rows).
Jason
Jason le 29 Mar 2011
Thank you, that worked perfectly

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion 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