필터 지우기
필터 지우기

'subsindex' error when setting figure position. What is going on?

조회 수: 1 (최근 30일)
Udit Gupta
Udit Gupta 2016년 9월 22일
댓글: William Chamberlain 2018년 10월 22일
I am trying to resize a figure as shown
H = figure;
set(H,'Position',[200 200 800 200])
I get the error
Function 'subsindex' is not defined for values of class 'matlab.ui.Figure'.
What is going on and how can I fix this?

채택된 답변

Walter Roberson
Walter Roberson 2016년 9월 22일
You accidentally created a variable named set so MATLAB thinks that set() expression is an attempt to index the variable.
  댓글 수: 3
Ragnar Eðvaldsson
Ragnar Eðvaldsson 2017년 10월 17일
Thanks so much Walter. This saved the day!
William Chamberlain
William Chamberlain 2018년 10월 22일
Worked for me: I had managed to create a variable named 'axes' which was giving me problems with
sub_axis_h(3) = subplot(2,2,3);
axes(sub_axis_h(1)); hold on; grid on; xlabel('x'); ylabel('y');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by