What exactly does 'gobjects' do?
10 views (last 30 days)
Show older comments
I just noticed the new gobjects function starting in R2013a. The MATLAB documentation states that users should use gobjects instead of zeros to initalize arrays for storing graphics handles.
When I use gobjects the resulting array looks like a double array in every way, exactly what zeros would output. Is gobjects actually doing anything special or is this just something saved for a future release?
(p.s. the code is stored in "%matlab root%\toolbox\matlab\graphics\gobjects.p" so I can't see what's going on inside.)
0 Comments
Answers (1)
Jan
on 8 Sep 2013
I claim that the type of graphic handles will differ from double in the future. Then gobjects is useful for forward compatibility.
Using the double type can lead to collisions, e.g. in
plot(AxesHandle, y)
0 Comments
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!