How can extract only real values of a matrix

After some oprations i have got a matrix which contains imaginary value also. But i need only the
matrix containing real values. How can i remove imaginary values from that matrix? For eg.
A=[18.0000;-3.8090 + 4.3920i;-2.6910 + 1.4001i;-2.6910 - 1.4001i;-3.8090 - 4.3920i]
But my output contains only real values
A=[18.000;-3.8090;-2.6910;-2.6910;-3.8090]
Please help

 채택된 답변

Mischa Kim
Mischa Kim 2014년 4월 8일

0 개 추천

Tinkul, use
real(A)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2014년 4월 8일

댓글:

2020년 4월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by