Y data addition on scatter plot
Mostrar comentarios más antiguos
i am plotting a scatter plot X= [ 2 ,3,4,5] Y=[10,20,30,40] scatter(X,Y) i am looking for putting y values on the scatter plot...any specific code or hint can anyone help.i am using 2016b version.Thank you in advance.
1 comentario
Well, the code - as you have it now - works:
X= [ 2 ,3,4,5]
Y=[10,20,30,40]
scatter(X,Y)
Respuesta aceptada
Más respuestas (1)
Cris LaPierre
el 17 de En. de 2022
Editada: Cris LaPierre
el 17 de En. de 2022
Use square brackets to define vectors, not curly braces. You might find MATLAB Onramp helpful, especially chapters 2, 4 & 9. Also, capitalization matters in MATLAB. X is not the same variable as x.
X= [2,3,4,5];
Y=[10,20,30,40];
scatter(X,Y)
Categorías
Más información sobre Scatter Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



