I am trying to apply wdenoise function over a 1-D array but I'm getting an error as ' Expected X to be finite ' error message ? How to fix this error.
7 次查看(过去 30 天)
显示 更早的评论
In the following code when mv1 is inserted within wdenoise function I am getting the above mentioned error.
load sigin.mat;
load ADBefMonopolarF3A1.mat;
a = AmodMREFCZ(1,:);
%b = AmodMREFCZ(2,:);
SigTr = F3A1' ;
sigin1 = SigTr(80001:82560);
time1 = a(75001:77560);
mv1 = movavg(sigin1,'linear',1);
chefiltop = filter(Butter1,mv1); % mv1 is moving average output of original signal sigin1 which is 1* 2560 array
plot(time1,mv1);
yden = wdenoise(mv1,6);
0 个评论
回答(1 个)
Arthi Sathyamurthi
2021-12-29
Hello Anand,
Since, the "sigin.mat" and "ADBefMonopolarF3A1.mat" were not attached I was not able to run the program attached. But the error "Expected X to be finite" results when the input (in your case mv1) to wdenoise function is not finite. Kindly check for any "NaN" or "inf" values in the mv1 variable and replace those values as necessary. You can use the isfinite function to check if the input is finite. You can refer to this link to know the list of elements recognized as finite.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!