필터 지우기
필터 지우기

How can extract only real values of a matrix

조회 수: 30 (최근 30일)
Tinkul
Tinkul 2014년 4월 8일
댓글: Ravikumar Bharti 2020년 4월 17일
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일
Tinkul, use
real(A)
  댓글 수: 1
Ravikumar Bharti
Ravikumar Bharti 2020년 4월 17일
It only takes the real valur of the matrix

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

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

Community Treasure Hunt

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

Start Hunting!

Translated by