14 Understanding different types of constants (i):
Understanding different types of constants (i):
1. Onto another constant, such as the numerical constant “i”. This constant represents the imaginary unit, which is used to
construct complex numbers.
2. For example, a complex number is created by adding a real number (e.g., 3) to an imaginary number (e.g., 4i), resulting
in 3 + 4i. So when MATLAB defines it, “0.0000 + 1.0000i” represents a complex number with a real part of 0.0000 and
an imaginary part of 1.0000.
1. In MATLAB you can define such constants in multiple ways.
2. To define “i” in MATLAB another way, is by √-1 (taking the square root of -1) we receive the same value as our
previous command where we simply define the constant i. This is because the square root of -1 resolves a way to solve
equations that couldn’t be solved using only real numbers.
3. It is also important to note that MATLAB has specific “words”/commands used in place of certain symbols. For
example, √ would translate into the user typing “sqrt” followed by their choice of value.
1. Another way we can solidify our understanding of the value of constants in MATLAB, is by reversing operations for
instance.
2. Take for example the constant i, equal to √-1, by multiplying i by itself we obtain -1. MATLAB in this sense, is a great
tool that allows users to expand their understanding on such constants and how they interconnect with relative
expressions.