I have encountered Error in scatterplot
古いコメントを表示
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 件のコメント
Shashank Prasanna
2013 年 2 月 9 日
what is your x and y? what is the output of
class x
class y
Is this for specific data or any x and y?
Ede gerlderlands
2013 年 2 月 9 日
Ede gerlderlands
2013 年 2 月 9 日
回答 (1 件)
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'])
1 件のコメント
Walter Roberson
2013 年 2 月 10 日
Or use
scatter(x,y)
カテゴリ
ヘルプ センター および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!