using smoothed data in FOR loop

3 visualizaciones (últimos 30 días)
john white
john white el 11 de Feb. de 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!

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by