matlab - How to make a loop over Integral Equation with limits -


I am trying to implement the loop on the integral "Ufluid equation". But I am unable to succeed. This is a big problem for using borders because the range is different in each step. Any body helps me to loop for these calculations.

  U = 3.888889 H = 0.25 r = linspace (-0.125, -0.0416); Ufluid1 = 1.5 * U * (1.0 - (2.0 * R / H). ^ 2); A1 = Yoga (Ufluid1,2) / ((- 0.125) - (- 0.0416)) R = Linspace (-0.0416, 0.0416); Ufluid2 = 1.5 * U * (1.0 - (2.0 * R / h). ^ 2); A2 = Yoga (Ufluid2,2) / ((- 0.0416) - (0.0416)) R = Linspace (0.0416, 0125); Ufluid3 = 1.5 * U * (1.0 - (2.0 * R / H). ^ 2); A3 = sum (Ufluid3,2) / ((0.0416) - (0125))  

Thanks in advance

If you want it as a loop then you can use a cell, however, the equation does not look like an integral, you should take into account the width of the integration elements . Also, I think there is a need to adjust the lympase. But about the loop, try:

  U = 3.888889 H = 0.25a = 0; R {1} = Lynxpace (-0.125, -0.0416); R {2} = Lynxpace (-0.0416, 0.0416); R {3} = Lynxpace (0.0416, 0.125); K = 1: length (r) Ufluid = 1.5 * U * (1.0 - (2.0 * R / h). ^ 2); A = A + Yoga (Ufluid, 2) / ((- 0.125) - (- 0.0416));  

Or if you want to save individual parts separately:

  U = 3.888889 H = 0.25 r {1} = Linuxpace (-0.125 , -) .0416); R {2} = Lynxpace (-0.0416, 0.0416); R {3} = Lynxpace (0.0416, 0.125); K = 1: length (r) Ufluid = 1.5 * U * (1.0 - (2.0 * R / h). ^ 2); Some {K} = amount (Ufluid, 2) / ((- 0.125) - (- .0416)); End  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -