How to assign point name to points in an array and then plot them ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all, I would like to name my points that are inside a matrix. and then plot them.
clc; clear all; close all;
A = [0,1.5+1.5i,4.5i,-6.75+6.75i,-20.25];
plot(A,'o')
I am not english speaker, please use simple terms for answer.
Thank you very much.
0 commentaires
Réponse acceptée
Walter Roberson
le 2 Déc 2022
A = [0,1.5+1.5i,4.5i,-6.75+6.75i,-20.25];
Anames = {'', 'start', 'impulse', 'peak', 'relax'};
Ar = real(A);
Aim = imag(A);
scatter(Ar, Aim, 'ro');
text(Ar, Aim + 0.2, Anames, 'HorizontalAlignment', 'left')
Plus de réponses (2)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!