The following code:
plot(x,y,'Marker','*','Color','r',x2,y2,'Marker','--','Color','b')
generates this error: "Invalid first data argument".
here x, y and x2, y2 are arrays of same size.

2 件のコメント

Kiran Sagar
Kiran Sagar 2016 年 4 月 7 日
x = [1 2 3] ;
y = 2*x ;
x2 = x ;
y2 = x ;
Image Analyst
Image Analyst 2016 年 4 月 8 日
Doesn't matter now. I told you how to fix it below.

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

 採用された回答

Image Analyst
Image Analyst 2016 年 4 月 7 日
編集済み: Image Analyst 2016 年 4 月 7 日

0 投票

'--' is not a valid choice for 'Marker'. Use a valid marker. See the help for a list of them.
Try this:
plot(x,y,'r*-', x2,y2,'bd-');

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by