MATLAB: I would like to get the average of some data only if the sample size is larger than two.
Hello,
I would like to get the average of some data only if the size of the sample is larger than two. So, if the sample size is smaller or equal to two, then it will not average. Thanks in advance.
I would recommend first design a filter, to filter at 100Hz, then down sample/resample, and then do PSD calculation. Actually I believeresample does that anti-aliasing for you already.
In my opinion, doing computation on the original signal is unnecessary and expensive. You may also be able to get better resolution within 0-50Hz via resample since again it's more computational friendly to zero pad a low sampling rate signal.
Best Answer