Hatoddyam Toto <bhattacharyya.samit@gmail.com> wrote in message <cd3b789066ba46908ce48ca2538d33d0@y14g2000yqm.googlegroups.com>...
> Hi,
> I have two functions f1(x1,x2) and f2(x1,x2). I want to get
> the value of x1 and x2 from interval (a,b) such that f1=f2 (up to n
> decimal). More clearly,
>
> choose x1,x2 from (a,b);
> if f1(x1,x2)  f2(x1,x2)<0.00001
> done
> if f1(x1,x2)  f2(x1,x2)>0.00001
> choose another x1 and x2 and again it will check
> and thus it will continue until to get the values
>
> How to write the code for it? Is there any inbuilt function in matlab
> to do that? Note that x1 and x2 are real valued, not a integer.
>
> Thanks for your help,
>
> Gordon
Whether or not you realize it, you are trying to do
a contour plot.
In general, there may be a curvilinear set of points
(x1,x2), such that
F(x1,x2) = abs(f1(x1,x2)  f2(x1,x2)) == 0
As I said, that is what contour does.
Searching using a random scheme seems a silly thing
to do here.
HTH,
John
