Handle class, what does it mean?
조회 수: 7 (최근 30일)
이전 댓글 표시
Regarding the _handle _class, you can see here that it mentions the following about this class: Objects that share references with other objects.
What does this mean?
Thanks.
댓글 수: 0
채택된 답변
Matt J
2012년 10월 7일
It means that when you make a change to 1 handle object, any copies of it will feel the same change. So for example, suppose I had
classdef myclass<handle
properties
p;
end
end
Then I would get behavior like this:
>> handle1=myclass; handle2=handle1;
>> handle1.p=5; handle2.p
ans =
5
>> handle1.p=7; handle2.p
ans =
7
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Handle Classes에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!