f

#### get(get(gca,'Children'),'xdata')

```hi everybody

i use get and gca to find the points of a plot  by below m-file :

syms  x y
B=0.3;d=1;m1=0.5;m2=1-m1;
u=x-m1*x/(x^2+y^2)-m2*(x-B*m1*x/(x^2+y^2)-d)/((x-B*m1*x/(x^2+y^2)-d)^2+(y-B*m1*y/(x^2+y^2))^2);
v=y-m1*y/(x^2+y^2)-m2*(y-B*m1*y/(x^2+y^2))/((x-B*m1*x/(x^2+y^2)-d)^2+(y-B*m1*y/(x^2+y^2))^2);
k11=diff(u,x);
k12=diff(u,y);
k21=diff(v,x);
k22=diff(v,y);
det=k11*k22-k12*k21;
subplot(2,1,1);
ezplot(det,[-2,2],[-2,2]);
t=get(get(gca,'Children'),'xdata')

my problem is this for some value of B (for example B=2) it give the
xdata of plot in form of array [1,n] .it is ok until now ,but for some
value of B  (for example B=1/sqrt(2) or B=0.6 ) it give a array [2,1]
as answer the ,for example matlab asnwer
t=
[1x235 , 1]
[1x432, 1]
why this works in this form . i think get(get(gca,'Children'),'xdata')
must has unique form for working ,i.e it give all data in form of [1,n]
..probably i my thought is wrong ??

``` 0 10/11/2006 3:12:16 AM comp.soft-sys.matlab  211265 articles. 25 followers. 0 Replies 1505 Views Similar Articles

[PageSpeed] 9