Error while plotting matrix of complex numbers

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

 採用された回答

madhan ravi
madhan ravi 2020 年 8 月 3 日

0 投票

plot(real(sub), 'r-', imag(sub) ,'b*');

3 件のコメント

chirag rohit
chirag rohit 2020 年 8 月 3 日
Actually i wanted to join complex numbers in matrix named 'sub' marked by blue colored * symbol and want to join all them by red color line. Likewise for remaining matrices.
madhan ravi
madhan ravi 2020 年 8 月 3 日
plot(real(sub), imag(sub) ,'b*', real(sub), imag(sub) , 'r')
chirag rohit
chirag rohit 2020 年 8 月 3 日
編集済み: chirag rohit 2020 年 8 月 3 日
Thank you. It solved the error.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by