Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.
|
|
|
Finding zeros
Posted:
Sep 26, 2010 9:13 PM
|
|
Hi all: I'm trying to figure out a solution to the following problem. I have the vectors x and y:
x y
0.0000 0.0000 0.2929 -28.7071 0.5859 -28.4141 0.8788 -28.1212 1.1717 -27.1605 1.4646 -26.8676 1.7576 -26.5746 2.0505 -26.2817 2.3434 -25.9888 2.6364 -25.6959 2.9293 -25.4029 3.2222 -25.1100 3.5152 -24.8171 3.8081 -24.5241 4.1010 -24.2312 4.3939 -23.9383 4.6869 -23.6453 4.9798 -23.3524 5.2727 -23.0595 5.5657 -22.7666 5.8586 -22.4736 6.1515 -22.1807 6.4444 -21.8878 6.7374 -21.5948 7.0303 -21.3019 7.3232 -21.0090 7.6162 -20.7161 7.9091 -20.4231 8.2020 -20.1302 8.4949 -19.8373 8.7879 -19.5443 9.0808 -19.2514 9.3737 -18.9585 9.6667 -18.6655 9.9596 -18.3726 10.2525 -18.0797 10.5455 -17.7868 10.8384 -17.4938 11.1313 -17.2009 11.4242 -16.9080 11.7172 -16.6150 12.0101 -16.3221 12.3030 -16.0292 12.5960 -15.7363 12.8889 -15.4433 13.1818 -15.1504 13.4747 -14.8575 13.7677 -14.5645 14.0606 -14.2716 14.3535 -13.9787 14.6465 -13.6858 14.9394 -13.3928 15.2323 -13.0999 15.5253 -12.8070 15.8182 -12.5140 16.1111 -12.2211 16.4040 -11.9282 16.6970 -11.6352 16.9899 -11.3423 17.2828 -11.0494 17.5758 -10.7565 17.8687 -10.4635 18.1616 -10.1706 18.4545 -9.8777 18.7475 -9.5847 19.0404 -9.2918 19.3333 -8.9989 19.6263 -8.7060 19.9192 -8.4130 20.2121 -8.1201 20.5051 -7.8272 20.7980 -7.5342 21.0909 -7.2413 21.3838 -6.9484 21.6768 -6.6554 21.9697 -6.3625 22.2626 -6.0696 22.5556 -5.7767 22.8485 -5.4837 23.1414 -5.1908 23.4343 -4.8979 23.7273 -4.6049 24.0202 -4.3120 24.3131 -4.0191 24.6061 -3.7262 24.8990 -3.4332 25.1919 -3.1403 25.4848 -2.8474 25.7778 -2.5544 26.0707 -2.2615 26.3636 -1.9686 26.6566 -1.6756 26.9495 -1.3827 27.2424 -1.0898 27.5354 -0.7969 27.8283 -0.5039 28.1212 -0.2110 28.4141 0.0819 28.7071 0.3749 29.0000 0.6678
and i want to calculate the value of x closest to the largest non- trivial zero of y. In this case, that would be x = 28.4141. In the above case, there are only two zeros of y (including the trivial one) but I might have other functions in which there may multiple non- trivial zeros and I would want the code to pick the value of x closest to the largest one. If there are no non-trivial zeros, then the code should pick the trivial solution. Any pointers will be appreciated.
Gautam.
|
|
|
|