Matrix reduction

1 次查看(过去 30 天)
Jason
Jason 2011-3-29
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.

采纳的回答

Matt Fig
Matt Fig 2011-3-29
If DAT is your original data.
NewDAT = DAT(round(linspace(1,length(DAT),101)))
  3 个评论
Matt Tearle
Matt Tearle 2011-3-29
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 2011-3-29
Thank you, that worked perfectly

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by