필터 지우기
필터 지우기

Low Pass filter for big experimental data set

조회 수: 1 (최근 30일)
Ammar Alfaili
Ammar Alfaili 2019년 9월 14일
댓글: Adam Danz 2019년 9월 14일
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 59992x59992 (26.8GB) array exceeds maximum array size preference."
I hope you can help :)
  댓글 수: 3
Ammar Alfaili
Ammar Alfaili 2019년 9월 14일
I am not sure that this approach is correct, but this goes wrong in the initial steps where the warning apears.
s = Fx;
noise = 0.5*randn(size(tA));
x1 = noise + s;
figure()
plot(x1)
Where Fx has a size of 59992 and tA has a size of (1 59992)
Adam Danz
Adam Danz 2019년 9월 14일
편집: Adam Danz 2019년 9월 14일
" Fx has a size of 59992 "
Do you mean [59992 x 59992] or do you mean that Fx is a vector with 59992 elements?
Let's look at each possibility.
Fx is size [59992 x 59992] matrix
I cannot create Fx at that size because I get the same error you're describing. So i'm wondering how that variable was created in the first place.
Fx is size [1 x 59992] row vector
This code runs quickly and without error because x1 = noise + s; also produces a vector of size 1x59992 which is no big deal.
Fx is size [59992 x 1] column vector
This code produces the error in your message because x1 = noise + s; produces a matrix of size 59992x59992 which is a big deal (3.6 billion values).
So my quesitons are
1) what is the real size of Fx
2) what is the expected size of x1?
My bet is on the 3rd interpretation given your error message (unless that error was caused by creating Fx as described in the 1st interpretation). If that's the case, are you expecting x1 to be a vector or matrix (question #2 above).

댓글을 달려면 로그인하십시오.

채택된 답변

Adam Danz
Adam Danz 2019년 9월 14일
편집: Adam Danz 2019년 9월 14일
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(:)).';
  댓글 수: 3
Ammar Alfaili
Ammar Alfaili 2019년 9월 14일
It worked. Thanx a lot :)
Adam Danz
Adam Danz 2019년 9월 14일
Glad I could help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by