I tried the following command in Matlab 2013a and Matlab 2014a to remove the tick labels:
plot(1:10, 1);
set(gca,'YTickLabel',[]);
This works perfectly. In Matlab 2015a, I get the following error:
Error using set
Conversion to double from struct is not possible.
Is this a bug or am I doing something wrong?

1 件のコメント

Sean de Wolski
Sean de Wolski 2015 年 8 月 20 日
Works fine for me in 15a.
What is gca
?

サインインしてコメントする。

 採用された回答

Guillaume
Guillaume 2015 年 8 月 20 日

0 投票

Most likely, you've created a variable called gca that is a structure and shadowing the gca function.
which gca
will tell you for sure

1 件のコメント

Jeroen Beeckman
Jeroen Beeckman 2015 年 8 月 21 日
Thank you! A 'clear all' resolved the problem indeed

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by