MATLAB Answers

Invalid first data argument

14 views (last 30 days)
The following code:
generates this error: "Invalid first data argument".
here x, y and x2, y2 are arrays of same size.


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

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 7 Apr 2016
Edited: Image Analyst on 7 Apr 2016
'--' 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-');


Sign in to comment.

More Answers (0)

Sign in to answer this question.