How to extract non complex number from an array?
Show older comments
if I have an array which have complex number and non complex number like
A = [2.2, 2+3i, 2-3i]
I want only 2.2 in A, i.e. A = 2.2
Answers (1)
Alan Stevens
on 17 Oct 2020
A(imag(A)==0)
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!