Borrar filtros
Borrar filtros

How to normalize data to loop variable?

2 visualizaciones (últimos 30 días)
Madan Kumar
Madan Kumar el 28 de Jun. de 2019
Editada: Madan Kumar el 29 de Jun. de 2019
Hi,
I have about 100 equations and I have to normalize sum of all to loop variable.
For simpliciyt, let say I have 3 equations, S1(i)=10*i*(i*i+2)+(2*i+5);S2(i)=(i^2-1)*(i+1);S3(i)=(i^2-i-1); I need to normalize sum of S1(i),S2(i) and S3(i) to (2*i+1) for each i. Any help.
example.
for i=1,10
S1(i)=10*i*(i*i+2)+(2*i+5);
S2(i)=(i^2-1)*(i+1);
S3(i)=(i^2-i-1);
S(i)=S1(i)+S2(i)+S3(i);
end
Now S(i) has to be normalized to (2*i+1) for each i. I checked normalization also, however, I didn't find any. Need help.
  2 comentarios
Adam
Adam el 28 de Jun. de 2019
I don't understand what you mean by normalising the sum of those values to 2*i + 1 for each i. Isn't S(i), which is your sum, just a scalar? In which case it isn't meaningful to normalise a scalar to something, especially not independently for each value in the array.
Madan Kumar
Madan Kumar el 29 de Jun. de 2019
Editada: Madan Kumar el 29 de Jun. de 2019
Yeah, may be you are right but this is physics based equation and I have to normalize as above.

Iniciar sesión para comentar.

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