Clear Filters
Clear Filters

How to normalize data to loop variable?

2 views (last 30 days)
Madan Kumar
Madan Kumar on 28 Jun 2019
Edited: Madan Kumar on 29 Jun 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 Comments
Adam
Adam on 28 Jun 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 on 29 Jun 2019
Edited: Madan Kumar on 29 Jun 2019
Yeah, may be you are right but this is physics based equation and I have to normalize as above.

Sign in to comment.

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!