Error while plotting matrix of complex numbers

1 vue (au cours des 30 derniers jours)
chirag rohit
chirag rohit le 3 Août 2020
Modifié(e) : chirag rohit le 3 Août 2020
clc
clear all
sub=[ -1.1691 + 113.64i; -9.0587 + 137.23i; -10.221 + 166.23i; -9.6819 + 197.8i; -8.5346 + 233.76i;
-1.1691 - 113.64i; -9.0587 - 137.23i; -10.221 - 166.23i; -9.6819 - 197.8i; -8.5346 - 233.76i];
sup=[ -13.605 + 570.94i; -12.344 + 556.39i; -11.068 + 539.83i; -9.7952 + 520.39i; -8.4823 + 496.4i;
-13.605 - 570.94i; -12.344 - 556.39i; -11.068 - 539.83i; -9.7952 - 520.39i ; -8.4823 - 496.4i];
TI=[ -86.534 + 37.766i; -85.883 + 37.936i; -85.384 + 38.191i; -84.9 + 38.399i; -84.506 + 38.589i;
-86.534 - 37.766i; -85.883 - 37.936i; -85.384 - 38.191i; -84.9 - 38.399i; -84.506 - 38.589i];
shaft=[ -0.48455 + 6.1504i; -0.48842 + 6.1493i; -0.4907 + 6.1486i; -0.49212 + 6.1481i; -0.49306 + 6.1477i;
-0.48455 - 6.1504i; -0.48842 - 6.1493i; -0.4907 - 6.1486i; -0.49212 - 6.1481i ; -0.49306 - 6.1477i];
EM=[ -19.362 + 91.845i ; -9.6224 + 94.729i; -6.5132 + 94.265i; -5.1096 + 94.093i; -4.3018 + 94.032i;
-19.362 - 91.845i; -9.6224 - 94.729i; -6.5132 - 94.265i ; -5.1096 - 94.093i; -4.3018 - 94.032i];
plot(sub,'r-',sub,'b*');
hold on;
plot(sup,'r-',sub,'b^');
hold on;
plot(TI,'r-',TI,'bx');
hold on;
plot(EM,'r-',EM,'bv');
hold on;
plot(shaft,'r-',shaft,'bs');
hold off

Réponse acceptée

madhan ravi
madhan ravi le 3 Août 2020
plot(real(sub), 'r-', imag(sub) ,'b*');
  3 commentaires
madhan ravi
madhan ravi le 3 Août 2020
plot(real(sub), imag(sub) ,'b*', real(sub), imag(sub) , 'r')
chirag rohit
chirag rohit le 3 Août 2020
Modifié(e) : chirag rohit le 3 Août 2020
Thank you. It solved the error.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by