How can the points of a scatter plot placed on a new matrix?

3 visualizaciones (últimos 30 días)
stelios loizidis
stelios loizidis el 14 de En. de 2022
Comentada: Jon el 14 de En. de 2022
Hello,
I have the following. I have a matrix W (2Χ50) and I make the scatter plot for each of its row, that is,
scatter(W(1,:),W(2,:))
The first point in the sctter plot corresponds to W (1,33), the second to the point W (2,5) and so on. How can I put these points (of the scatter plot) in a new matrix in the order they appear in the scatter plot?

Respuesta aceptada

Jon
Jon el 14 de En. de 2022
Editada: Jon el 14 de En. de 2022
Assuming you mean by the first point, second point, etc in the scatter plot their order of appearance from left to right (along the x axis of the plot) you could do this
[~,idx] = sort(W(1,:))
Wnew = W(:,idx)
  2 comentarios
stelios loizidis
stelios loizidis el 14 de En. de 2022
It works!!! Thanks for the quick and valuable help !!!!
Jon
Jon el 14 de En. de 2022
You're welcome. Good luck with your project.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by