From: Mayi DA on
Dear all
Recently, I am confusing about 'findobj' command. I read HELP file of findobj, but did not find anything about the output regulation rule of findobj. It seems the output handle is descending. For example:
>> findobj('Color','r')

ans =

167.0044
166.0044
152.0044

But I m not sure how findobj sort output handle, I guess the output handle is descendin, am i right?

Best Regards
mayi
2010-07-22
From: Walter Roberson on
Mayi DA wrote:

> Recently, I am confusing about 'findobj' command. I read HELP file of
> findobj, but did not find anything about the output regulation rule of
> findobj. It seems the output handle is descending. For example:
>>> findobj('Color','r')
>
> ans =
>
> 167.0044
> 166.0044
> 152.0044
>
> But I m not sure how findobj sort output handle, I guess the output
> handle is descendin, am i right?

There is no reason for findobj to sort the outputs, as the values have
no (documented) internal meaning: they are considered to be arbitrary
references. If the values appear to be sorted, it could well just be by
chance. (I have deduced some rough internal guidelines about the
numbering; if my analysis is correct, it would not be uncommon for
findobj() to return sorted values, but it would also not be difficult to
create a pattern of objects that would probably not be sorted.)