Prev: Legend in scatter plot
Next: update GUI while in .m
From: faisal on 18 Jun 2010 14:50 Hi.... i have a linear equation to plot a straint line y=3073x-860 and x-y data to plot a non.uniform shaped curve with coordinates [(0,2765) (0.2,2580) (0.4,2370) (0.6,2160) (0.8,1905) (0.9,1765) (1,1490)] Now, the problem is , i want to find the intersection point of the curve and the straight line.... Kindly help me, regards,
From: Matt J on 18 Jun 2010 14:57 "faisal " <maabdolat(a)yahoo.com> wrote in message <hvgf14$946$1(a)fred.mathworks.com>... > Hi.... > > i have a linear equation to plot a straint line > y=3073x-860 > > and x-y data to plot a non.uniform shaped curve with coordinates > > [(0,2765) (0.2,2580) (0.4,2370) (0.6,2160) (0.8,1905) (0.9,1765) (1,1490)] > > Now, the problem is , i want to find the intersection point of the curve and the straight line.... =============== Your problem isn't fully formulated. Since there are infinitely many curves passing through this finite set of points, you need to identify more conditions that the curve must satisfy... enough so that it is uniquely specified.
From: Walter Roberson on 18 Jun 2010 15:02 faisal wrote: > i have a linear equation to plot a straint line > y=3073x-860 Yah, we received your first copy; two more copies within 5 minutes was not needed. > and x-y data to plot a non.uniform shaped curve with coordinates > > [(0,2765) (0.2,2580) (0.4,2370) (0.6,2160) (0.8,1905) (0.9,1765) (1,1490)] > > Now, the problem is , i want to find the intersection point of the curve > and the straight line.... No, you want to find the intersection of a straight line and a series of straight line segments. Take all your x and plug them into y=3073*x-860 . You will get a y for each one. Loop over y(K) and determine whether it is between curve_y(K) and curve_y(K+1); if it is, then you have an intersection on that segment and you can go ahead and calculate the exact point of intersection using standard algebra.
From: faisal on 18 Jun 2010 15:44 Thanks for helping me out, but it wil be a great favour if u write me the code, because i m new user of matlab and does not know how to do what u said.... regards
From: us on 18 Jun 2010 15:58
"faisal " <maabdolat(a)yahoo.com> wrote in message <hvgia4$8gn$1(a)fred.mathworks.com>... > Thanks for helping me out, but it wil be a great favour if u write me the code, because i m new user of matlab and does not know how to do what u said.... > > regards this request is bluntly impertinent... us |