moving averag : Out of memory. The likely cause is an infinite recursion within the program.

1 回表示 (過去 30 日間)
Rahim Nami
Rahim Nami 2022 年 9 月 25 日
コメント済み: Rahim Nami 2022 年 10 月 1 日
Hello
In the use of the MovavgFilt.m code. that from the link:
https://www.mathworks.com/matlabcentral/fileexchange/35925-moving-average-filter
It has been achieved with an error:
Out of memory. The likely cause is an infinite recursion within the program.
Error in movavgFilt (line 16)
Out = movavgFilt (In, Len, Param);
Please guide
Also, I did not enter my data because I encountered an error with the data that was written in the code itself
  3 件のコメント
Rahim Nami
Rahim Nami 2022 年 9 月 26 日
thank you. As you mentioned.
I use the function without the default example and with my own data, I get the following error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in movavgFilt (line 31)
New_In = [Pad In Pad];
Stephen23
Stephen23 2022 年 9 月 26 日
"I use the function without the default example and with my own data, I get the following error: Error using horzcat Dimensions of arrays being concatenated are not consistent."
The function assumes (but does not check) that the first input is a row vector. Nor does it document this requirement.
A better-written function would either check this or allow a vector of any orientation.

サインインしてコメントする。

回答 (1 件)

David Hill
David Hill 2022 年 9 月 26 日
m=readmatrix('TX.txt');
x=movavgFilt(m(:,2)',5,'Center');%data needs to be row vector

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by