Error while plotting matrix of complex numbers

조회 수: 1 (최근 30일)
chirag rohit
chirag rohit 2020년 8월 3일
편집: chirag rohit 2020년 8월 3일
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일
plot(real(sub), 'r-', imag(sub) ,'b*');
  댓글 수: 3
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개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by