Calculate angles and absolute value of complex number -Matlab

399 Views Asked by At

how to Calculate the angles and absolute value of complex number by using matlab commands: the complex number is:$$e^{3+4j}+e^{3-4j}$$

tyy!!

2

There are 2 best solutions below

7
On BEST ANSWER

Hint: This is equal to $2\exp(3)\cos(4)$

If you want to do it with MATLAB

close all; clear all; clc;
absolut_value = abs(exp(3+4*i)+exp(3-4*i));
arg = angle(exp(3+4*i)+exp(3-4*i));

Note, that 3.14159 ... is the numerical value of $\pi$.

0
On

idk about matlab, but from simple complex analysis you know

$e^{3+4i} + e^{3-4i} = e^3*e^{4i} + e^3*e^{-4i} = e^3*(e^{4i}+e^{-4i})$

take $e^{4i}+e^{-4i}$ $ = cos(4) + isin(4) + cos(-4) + isin(-4) = 2*cos(4)$ (because $cos(-x) = cos(x)$ and $sin(-x) = -sin(x)$)

so now we have $e^3*2*cos(x)$ which is a real number

Thus $\theta = 0$ and $r = e^3*2*cos(4)$

For general numbers $x+iy$ and $x-iy$, you can do the same thing.

Separate the $e^x$ from the $2*cosh(iy)$

Use the identity $cosh(iy) = cos(y)$

So you'll always end up with $\theta =0$ and $r = e^x*2*cos(y)$

You don't need to use matlab for this, or you can just take the inputs x, y and output the general answers I presented