Professional Documents
Culture Documents
1.1.2. ^0.5
This expression takes the square root of any digit or quantity when written after that
and it can be observed from Figure 2.
𝟑
The answer of this expression in MATLAB is left one, which is 𝟐 + ∗ 𝟓
𝟒
1.1.8. (2+3)^4/5
(𝟐+𝟑)𝟒
The answer of this expression in MATLAB is right one, which is
𝟓
1.1.9. 2/3/4/5
𝟐
𝟑
𝟒
The answer of this expression in MATLAB is right one, which is
𝟓
i and j both are imaginary numbers and can be observed in MATLAB with zero in
real part.
1.2.4. Z = pi +4i
1.3.2. Sin(π)
1.3.3. Tan(π/2)
Yes, this is a strange behavior from MATLAB because this value should be infinity
but for MATLAB this value of 1016 is very large value almost equal to infinity.
1.3.4. Cos-1(-1)
1.3.5. e-1
1.3.6. ln(e2)
1.3.7. log10(100)
1.4. Arrays:
1.4.1. Multiplication of Array by 2
Multiplication between two arrays called even and odd does not happen in our case
because this is like matrix multiplication and for this to happen matrix dimensions
should be satisfied. This case does not follow matrix multiplication rule so
MATLAB gives dimension error.
1.4.6. Multiplication by “.*” Operator
This operator multiplies each element of an array with other element of second
array positioned at the same location.
1.4.7. Concatenating Arrays:
This command merges two arrays meaning at the end of 1st placed array there will
be 2nd array in the concatenated array.
1.5. Plotting:
1.5.1. Array with Steps:
After observing the above array it can be declared that the last value of array “x” is
not 2π. The reason behind this scenario is only those numbers are selected as element
of array “x” which have a difference of 0.1 between adjacent numbers. Therefore
2π= 6.28 cannot be selected.
1.5.3. Creating two Arrays of Different Sizes: