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 comentarios

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

Iniciar sesión para comentar.

 Respuesta aceptada

Image Analyst
Image Analyst el 7 de Abr. de 2016
Editada: Image Analyst el 7 de Abr. de 2016

0 votos

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

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 7 de Abr. de 2016

Comentada:

el 8 de Abr. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by