What does this mean?
显示 更早的评论
Hi all
I am beginner in Matlab and currently learning about Matlab graph. I used this following code :
%%--------------------------------
t=0:0.1:10;
y1=sin(t);
y2=cos(t);
y3=t.^2;
f1=figure(1);
s1=subplot(2,1,1);
h1=plot(t,y1);
s2=subplot(2,1,2);
h2=plot(t,y2);
f2=figure(10);
h3=plot(t,y3);
get(0,'Children')
get(f1,'Children')
-------------------------------
the code
get(0,'Children')
will return
ans =
10
1
which is the 10 and 1 there can be understood referring to figure(10) and (1)
but when I tried
get(f1,'Children')
Matlab will return
ans =
175.0048
173.0048
I know that this number refer to s1 and s2. But My question is what does this number actually mean? or in simpler question : if I assume that I change the code (in subplot part ) to
f1=figure(1);
subplot(2,1,1);
h1=plot(t,y1);
subplot(2,1,2);
h2=plot(t,y2);
how do we know that those numbers refer to s1 and s2?
Any help is appreciated
Ali
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!