필터 지우기
필터 지우기

I have encountered Error in scatterplot

조회 수: 10 (최근 30일)
Ede gerlderlands
Ede gerlderlands 2013년 2월 9일
When I tried to scatterplot(x,y)
'' Operands to the || and && operators must be convertible
to logical scalar values.
Error in ==> scatterplot at 61
if ((fix(n) ~= n) || (n <= 0)) ''
will pop up what can I do about it ?...any help is higly appreciated.
  댓글 수: 3
Ede gerlderlands
Ede gerlderlands 2013년 2월 9일
x and y are data that contains 156 elements each and are real numbers.The class is 'double'.
Ede gerlderlands
Ede gerlderlands 2013년 2월 9일
X = 0.150 0.180 0.390 ,,,,,
Y = 12 31.4 25 ,,,,,,,

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

답변 (1개)

Shashank Prasanna
Shashank Prasanna 2013년 2월 9일
You inputs should in the form of a matrix and not two vectors. Take a look at the input arguments in the documentation page:
If X and Y are row vectors, stack them up column wise and pass it to scatterplot.
scatterplot([X',Y'])

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by