How can extract only real values of a matrix

44 vues (au cours des 30 derniers jours)
Tinkul
Tinkul le 8 Avr 2014
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

Réponse acceptée

Mischa Kim
Mischa Kim le 8 Avr 2014
Tinkul, use
real(A)
  1 commentaire
Ravikumar Bharti
Ravikumar Bharti le 17 Avr 2020
It only takes the real valur of the matrix

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by