hi, I have a problem. I thought my solve block is not working properly.
I posted two picture
I used "if"( red block) to find "a" in first picture.
And then I used "a2 equation" to find "a" in second picture.
the results are same between two pictures.
So I can't be confidence about "my solve block"
so Could you check why the results are same?
<First picure>
<Second>
I don't understand why you think that the values should be different. The difference in your two definitions of a2() is only for values of a above 0.4.
But (almost) all values you use are below 0.4, so you sure should get the very same values.
Only the last value (0.416) is slightly greater than 0.4 and actually you get (slightly) different results for the last value in the vectors for a.r and a'.r:
umm..
I determined initial values [a=0, a'=0]
I guess that a is incresing to find convergence between a and a2.
If a is incresing above 0.4, anther equation will be used because I restricted it by using "if"
so I think the results may be different.
But you said "if" applied result's value.
"if" just applied initial value in "solve block"