MATLAB: Low Pass filter for big experimental data set

lowpass filterMATLAB and Simulink Student Suite

Hello
I have some experimental data-set and I am using a low pass filter in order to remove the noise.
The problem is that when trying to run the code I am getting this warning : " Requested 59992×59992 (26.8GB) array exceeds maximum array size preference."
I hope you can help 🙂

Best Answer

My hunch is that x1 should be a vector (not a matrix) and that Fx is a column vector.
If this hunch is correct, the solution is to transpose Fx (or 's' or 'noise').
x1 = noise + s.';
% ^^ this makes 's' a row vector
If the orientation of a vector (row vs column) is unknown, you can force the vectors to be rows or columns using this method (assuming inputs are vectors of equal lenght).
% If you want a column output
x1 = noise(:) + s(:);
% If you want a row output
x1 = noise(:).' + s(:).'; % or x1 = (noise(:) + s(:)).';