using smoothed data in FOR loop

6 次查看(过去 30 天)
john white
john white 2021-2-11
hi
I wrote a code in a for loop, in the code a variable is updating and another variable is effected by, the first variable is so noisy at the end of the loop and I want the smoothed one. I have used the smooth order but it works at the end of loop and in the loop it does not work for example I want the first data in the loop be the first data of the smoothed one etc.
this is the code:
for i = 1:15000
.
.
.
T2(i) = .........
x(i) = 5*T2(i);
end
the T2 is
and the smoothed one is:
i used the smooth order in the loop as:
for i = 1:15000
.
.
.
T2(i) = . . . .
T2(i) = smooth(T2(i),0.1,'rloess');
x(i) = 5*T2(i);
end
but it does not work!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by