필터 지우기
필터 지우기

What exactly does 'gobjects' do?

조회 수: 11 (최근 30일)
Kristofer Kusano
Kristofer Kusano 2013년 9월 6일
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.)

답변 (1개)

Jan
Jan 2013년 9월 8일
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)
when y is a scalar (see Answers: magic numbers).

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by