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

3 ビュー (過去 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 Center および File ExchangeAnnotations についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by