Basic Axes Handle question
조회 수: 1 (최근 30일)
이전 댓글 표시
Ok so this is an extremely basic question.
If I write
h=gca
Matlab should create a new figure with axes and give me its handle. Exactly how its described in the helpfile.
But if I try to do this
set(h, 'title', 'testtitle')
I get an error saying
??? Error using ==> set Value must be a handle
I dont understand why MATLAB doesnt think its a handle, its obviously an axes handle.
댓글 수: 0
채택된 답변
Fangjun Jiang
2011년 10월 26일
h=gca;
TitleHandle=get(h,'title')
set(TitleHandle,'string','this is title text');
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!