For m=0,1,
,7, I am finding the intersection point of a straight line and a sine function (S):
ystar[m_] :=
NSolve[zbar[m] + mpw*(y - ybar[m]) - S[y, m] == 0 &&
y < ybar[m] - 0.001, y, Reals]
In case there is more than one solution (for each m), I define
Y[m_] := Max[ystar[m]].
When I compute for m=3, I get
In[71]:= Y[3]
Out[71]= y -> 15.8865
I would like to make my answers come out with an equality sign in place of the arrow (which, I assume, indicates an approximation to the root). My next step is
In[20]:= y /. Y[3]
Out[20]= 15.8865
which seems to accomplish what I want. I would like, however, to do that for all eight numbers simultaneously, something like
y[m] /.Y[m]
which does not work. How can I define a function that gives me the numbers without the arrows? This is important to me because, in actual cases, m can run into the hundreds.