How to decimate by rows in a dataset ?

3 views (last 30 days)
Bikram Kawan
Bikram Kawan on 16 Jul 2015
Commented: Bikram Kawan on 16 Jul 2015
Hi I have dataset of 1918975 rows and 10 columns. I need to resample this data without aliasing effect. I found the solution was decimate. But It doesnot work with whole matrix. I only accept vectors. So how can i do this by rows to decimate something like 19189 rows and 10 columns. If there is other method to resample you are welcome to give your idea.

Answers (1)

Image Analyst
Image Analyst on 16 Jul 2015
I don't know how you can avoid aliasing completely, but you can subsample like this
smallM = M(startingRow : stepRow : endingRow);
For example to take every other row:
smallM = M(1:2:end); % Or M(2:2:end);
  2 Comments
Bikram Kawan
Bikram Kawan on 16 Jul 2015
Thank you but. My professor said there will be aliasing effect and the method you recommend i showed him already but was not happy with the output.
Bikram Kawan
Bikram Kawan on 16 Jul 2015
I was looking something like this http://uk.mathworks.com/help/signal/ref/decimate.html But this function only works for vector. But I need to run for multiple rows.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!