|
本帖最后由 秋冬0211 于 2019-2-8 07:55 编辑
- function y=rectFilt(x,width)
- if mod(width,2)==0
- disp('The width should be odd, nevermind I have added 1 on the width you typed in')
- modwidth=width+1;
- else
- modwidth=width;
- end
- a=(modwidth-1)/2;
- k=NaN(1,a);
- data=[k,x,k];
- for A=1:(size(data)-2*a)
- y(A)=nanmean(data(A+a:A+2*a));
- end
- end
复制代码
如题,刚学MATLAB,检查了两个多小时也没有发现哪里出错。
其中x为1x100的数据,可通过m文件加载入。
问题:点击运行以后,运行按钮变成带有省略号的样子,然后没有反应
原题目已上传
|
-
原题目
-
问题显示
|