Racer Posted December 11, 2004 Report Share Posted December 11, 2004 As a learning exercise, I've been trying to convince LV to find the zeros for equations using the most basic bisection method. The method itself involves average an upper and lower number, averaging them, looking for a sign change (in the function) then replace the upper or lower guess based on the sign change. There is an explanation here: Bisection Method I've written the program in C++, and Matlab, but I'm having trouble doing it in LV. I was wondering if someone else has already done it (or something similar), and wouldn't mind letting me look at it. BTW: to complicate things even more, I'm trying to do this without a case structure or formula node. Is this possible? --CS Quote Link to comment
Louis Manfredi Posted December 13, 2004 Report Share Posted December 13, 2004 Hi Racer: Haven't got a LV bisection solver handy-- But here's some hints on avoiding the case structure & formula nodes-- To avoid the case structure, use Select from the Comparison menu. (Picture attached-- not always an efficient thing to use, if there's lots of calculations leading up to the choice not selected, but in this case were the chosen & non-chosen values are already calculated anyway, a good choice since it is nice and readable.) To most easily avoid the formula node, (and probably best in anyway in the interest of generality) write the function you wish to solve as a Sub-vi to be called by the main vi. If no one else posts a solver from their archives, I might get a chance to sketch one out for you later on. Best Regards, Louis Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.