Index exceeds matrix dimensions when using scatterplot

Hi everyone,
I am trying to do some data exploration and keep getting an "Index exceeds matrix dimensions." error when trying to do a scatterplot.
My problem has a vector with 100000 columns but I tried with this simple example and get the same error.
x = [1,2,3,4,5,6,7,8,9]
y = rand(1,9)
scatter(x,y)
Apologies in advance for the likely very simple thing that I am missing but can't think of what could be the issue when looking at the scatter() documentation.

3 件のコメント

VBBV
VBBV 2021 年 4 月 26 日
Which version of MATLAB you're running ?
leocchi
leocchi 2021 年 4 月 26 日
R2016a
Jan
Jan 2021 年 4 月 26 日
Please post a copy of the complete error message. This would reveal more details.

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

 採用された回答

Walter Roberson
Walter Roberson 2021 年 4 月 26 日

1 投票

You have accidentally defined a variable named scatter
or you have a third-party version of scatter() and the error is occuring inside that. What shows up for
which -all scatter

1 件のコメント

leocchi
leocchi 2021 年 4 月 26 日
I installed the latest version of matlab and it seems to be working fine, but i assume this was the issue. Thank you!

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

その他の回答 (0 件)

カテゴリ

質問済み:

2021 年 4 月 26 日

コメント済み:

2021 年 4 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by