Moving Average of Matrix over 10 min interval

조회 수: 5 (최근 30일)
Emily Browning
Emily Browning 2019년 6월 22일
댓글: Chris Turnes 2019년 7월 2일
Hi,
Is there a way to take the moving avereage of a 2D matric over a time interval. I have attached what I tryed bellow with the error message shown after runing it
k= minutes(10);
MF= %unaveraged velocity matrix of size 18X24683
Data1.Time = % date time values of size 1X24683
MAMF=movmean(MF,k,2,'SamplPoints',Data1.Time)
Window length must be a finite positive scalar or 2-element vector
of finite nonnegative scalars.
Error in datetime/movmean (line 105)
y = builtin('_movmeandt', args{:});

답변 (1개)

Chris Turnes
Chris Turnes 2019년 7월 2일
The error message could be clearer about the problem you're having, but you're getting the message because you've misspelled "SamplePoints". If you fix the spelling, you should get what you need.
  댓글 수: 2
Emily Browning
Emily Browning 2019년 7월 2일
I fixed the spelling error now I am getting the error message:
'SamplePoints' value must be a 1-element vector.
Error in datetime/movmean (line 105)
y = builtin('_movmeandt', args{:});
Chris Turnes
Chris Turnes 2019년 7월 2일
Can you provide a MAT file with your data, and a simple reproduction script?

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by