How to extract non complex number from an array?
显示 更早的评论
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
回答(1 个)
Alan Stevens
2020-10-17
A(imag(A)==0)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!