Function isreal - complex numbers, MATLAB in Mathematics

Assignment Help:

Function isreal - complex numbers:

The function isreal returns 1 for logical true when there is no imaginary part of the argument, or 0 for false when the argument does have an imaginary part (even if it is 0). For illustration,

>> isreal(z1)

ans =

   0

>> z5 = complex(3)

z5 =

   3

>> isreal(z5)

ans =

   0

>> isreal(3.3)

ans =

   1

 

For the variable z5, however it displays the answer as 3, it is really stored as 3 + 0i, and that is how it is exhibited in the Workspace Window. And hence, isreal returns logical false as it is stored as a complex number.


Related Discussions:- Function isreal - complex numbers

Polar form, Polar Form: Any complex number z = a + bi can be thought o...

Polar Form: Any complex number z = a + bi can be thought of as a point (a,b) or vector in the complex plane in which the horizontal axis is the real part of z, and the vertica

Blanks function, Blanks function: The blanks function will generate a ...

Blanks function: The blanks function will generate a string consisting of n blank characters-that are kind of hard to see here! Though, in a MATLAB if the mouse is moved to hi

Illustration of labels and prompts, Illustration of Labels and prompts: ...

Illustration of Labels and prompts: The program below prompts the user for endpoints (x1, y1) and (x2, y2) of a line segment, and computes the midpoint of the line segment, th

Sprintf function, sprintf function: The sprintf function works precise...

sprintf function: The sprintf function works precisely like the fprintf function, but rather than printing it generates a string. Here are some illustrations in which the outp

Illustration of variance, Illustration of Variance For illustration, fo...

Illustration of Variance For illustration, for the vector [4, 6, 1, 5], there are n = 4 values therefore n - 1 is 3. The mean of this data set is also 4. The variance will be

Illustrations of variable number of output arguments, Illustrations of Vari...

Illustrations of Variable number of output arguments: In the illustrations shown here, the user should actually know the type of the argument in order to establish how many va

Using functions with the vectors and matrices, Using Functions with the Vec...

Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct

Applications of customized strings, Applications of Customized Strings: Lab...

Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot

Differentiation, Differentiation: The derivative of a function y = f(x...

Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd