Not sure what the scatterplot error is?

I am getting an error message when I try to plot this, but MatLab does not specify what the problem is. Thanks.
GL4_Strm = xlsread('GL4_Stream.xlsx');
GL4_endm = xlsread('GL4_Endmember.xlsx');
scatterplot(GL4_Strm,GL4_endm);

댓글 수: 8

the cyclist
the cyclist 2017년 3월 25일
Please post the entire error message.
Also, if you could upload the data files (or a smaller version that reproduces the error), that would be helpful.
Star Strider
Star Strider 2017년 3월 25일
What does the error message say?
Please copy all the red text from the Command Window and paste it to your original post or to a Comment here.
L. E.
L. E. 2017년 3월 25일
편집: Walter Roberson 2017년 3월 26일
The error message is:
Operands to the || and && operators must be convertible to logical scalar values.
Error in scatterplot (line 60)
if ((fix(n) ~= n) || (n <= 0))
Error in GL4_EMMA (line 17)
scatterplot(GL4_Strm,GL4_endm);
Star Strider
Star Strider 2017년 3월 25일
What are the sizes (dimensions) of ‘GL4_Strm’ and ‘GL4_endm’?
L. E.
L. E. 2017년 3월 25일
GL4_Strm is 26x15 double, and GL4_endm is 74x16 double.
Star Strider
Star Strider 2017년 3월 25일
The scatter function requires two equal-length vectors. There is no way you can plot those two matrices even if you created vectors out of them. They have different sizes, and different numbers of elements.
L. E.
L. E. 2017년 3월 25일
Thanks! I was able to eliminate some null values that were floating around and use the reshape function.
Star Strider
Star Strider 2017년 3월 25일
My pleasure!
Now I wish I’d posted this as an Answer!

답변 (0개)

이 질문은 마감되었습니다.

질문:

2017년 3월 25일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by