How to eliminate numbers without imaginary part?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to keep just the complex numbers.
a =[
2.70810968
2.45396925
1.13928251
-4.04946201
0.8829 - 0.13089*i
0.1308*i + 0.8829
0.15285*i - 2.00890
-0.1528510*i - 2.0089069]
Thanks for any help
댓글 수: 0
채택된 답변
Walter Roberson
2021년 1월 6일
format long g
a =[
2.70810968
2.45396925
1.13928251
-4.04946201
0.8829 - 0.13089*i
0.1308*i + 0.8829
0.15285*i - 2.00890
-0.1528510*i - 2.0089069]
b = a(imag(a) ~= 0)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!