| Author |
Comment/Response |
Henry Lamb
|
09/24/03 7:26pm
You should draw your y vs. t plot after calling NDSolve, instead of preparing the table. That way it's easier to identify the maxima, and choose the one you want. With your set of equations, there are three peaks, with the largest near t=18.
Assuming that's the one you want, you can find the y and t values with
FindMinimum[-interp,{t,18}]
(or FindMaximum[interp,{t,18} if you're using version 5)
then
maxYoft=-%[[1]];tformaxY=t/.%[[2]];
There are two locations for halfmaxY, one on each side of the peak. You can get them both in one step.
FindRoot[interp==halfmaxY,{t,#}]&/@{18,19}
or, in more general form,
FindRoot[interp==halfmaxY,{t,#}]&/@Through[{Floor,Ceiling}[tformaxY]]
URL: , |
|