DocumentationHelp CenterDocumentation
Imaginary part of complex number
Y = imag(Z)
example
Y = imag(Z) returns the imaginary part of each element in array Z.
Y
Z
collapse all
Find the imaginary part of the complex number Z.
Z = 2+3i; Y = imag(Z)
Y = 3
Find the imaginary part of each element in vector Z. The imag function acts on Z element-wise.
imag
Z = [0.5i 1+3i -2.2]; Y = imag(Z)
Y = 1×3 0.5000 3.0000 0
Input array, specified as a scalar, vector, matrix, or multidimensional array. imag operates element-wise when Z is nonscalar.
This function fully supports tall arrays. For more information, see Tall Arrays.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
abs | complex | conj | i | j | real
abs
complex
conj
i
j
real
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office