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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Image Analyst
Image Analyst am 7 Apr. 2016
Bearbeitet: Image Analyst am 7 Apr. 2016

0 Stimmen

'--' 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-');

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by