Converting cosine to exponential form
16 views (last 30 days)
Show older comments
I am trying to convert a cosine function to its exponential form but I do not know how to do it.
[more elaboration]
syms w y
function1 = input('user please enter input');
%user input is cos(y)
desired_output = (-1)^(w*pi) if y = w*pi
0 Comments
Answers (1)
Jan
on 7 Nov 2021
cos(x) = 0.5 * (exp(1i * x) + exp(-1i * x))
exp(ix) = cos(x) + 1i * sin(x)
I do not understand, why the desired output is (-1)^(w*pi).
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!