Reducing number of points in 1 direction of 2D matrix with average
Hello,
I have a 2D matrix with ~ 20000 columns which represent different time intervals. I am looking to change the time intervals through averaging the row values of the matrix in intervals to create a new matrix without changing the size of the matrix in the Y direction. For example, if I could average the rows of every two columns of the 20000 column matrix to obtain a new matrix with 10000 columns [where new column 1 = (average of old column 1 and column 2) and so on...]
So far, I have used rowsums and dimsize to obtain an average for the entirety of the rows, but I have not come across anything that allows me to do an interval average and create a new "average value" matrix.
Ideally, I would like to create a slider that allows me to change the time scale, i.e. the amount of columns the average is done by, but this is the next step and I first need to figure out how to make an "average value" matrix.
I would appreciate any help! Thanks in advance.
June 26, 2018 at 09:54 am - Permalink
June 26, 2018 at 11:36 pm - Permalink
June 27, 2018 at 12:43 am - Permalink
June 27, 2018 at 12:50 am - Permalink
June 27, 2018 at 12:56 am - Permalink
June 27, 2018 at 04:35 am - Permalink
June 27, 2018 at 05:19 am - Permalink
June 27, 2018 at 05:27 am - Permalink
June 27, 2018 at 05:28 am - Permalink
June 27, 2018 at 05:45 am - Permalink