using smoothed data in FOR loop

6 views (last 30 days)
john white
john white on 11 Feb 2021
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!

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!