Interactive input? and sorting FindRoot list
- To: MATHGROUP at christensen.cybernetics.net
- Subject: [mg637] Interactive input? and sorting FindRoot list
- From: REECE_D <REECE+_D%A1%Electromagnetic_Sciences at mcimail.com>
- Date: Mon, 3 Apr 95 11:03 EST
Two questions: 1) Is there a way to have a module execute up to a point, ask the user for input and then continue? 2) How does one take a list of roots returned from Table[FindRoot[eq, i], {i,x0,x1,di}] and return only the unique roots? The problem I am encountering is that FindRoot will return two or more versions of the same root so Union sees them as distinct while in reality they are approximations to the same root. I've tried N[] and SetPrecision[] with no luck. I am trying to write a module which will calculate a characteristic equation, plot it, prompt the user for approximate distance between roots and then return the first n roots. I could eliminate the plot and prompt if I knew of a robust method to calculate the first n roots of the characteristic equation. Any help/ideas on these questions would be greatly appreciated. Daryl