The following is from Wikipedia - https://en.wikipedia.org/wiki/Euler%27s_formula
below is what I get when I try for 0 and 30 deg
ans = 1
ans = 1.1688
Should I not be expecting ans = 1 for every value of theta?
Hi. To reinforce what UliBru wrote, your
command should be changed to:
sqrt(cos(30*2*pi/360)^2 + sin(30*2*pi/360)^2)
Apologies. That was really stupid of me
Sharan123, don't worry. The only people who never makes mistakes are people who never do anything. :-)
If your goal is to understand Euler's equation, you might find my first blog article helpful:
"The Exponential Nature of the Complex Unit Circle"
Thanks. I will take a look.
The basic formula is
sqr(sin(alpha)) + sqr(cos(alpha)) = 1
Thus the correct formula for your example is
sqrt(sqr(sin(alpha)) + sqr(cos(alpha))) = 1