convert complex number to Integers
18 次查看(过去 30 天)
显示 更早的评论
I have a exponential function and cordic exponential function.
I see a differenc in output for exponential and cordic exp func
Example -
theta = [-pi:pi/4:pi]
y = exp(theta)
y1 = cordiccexp(theta)
cordic exponential works only for complex number where as exponential works for complex and real/integer numbers
Question - How to (Mathematics) get cordiccexp out same as exponetial function
0 个评论
回答(1 个)
KSSV
2021-5-11
编辑:KSSV
2021-5-11
cordicexp calculates
cos(theta)+i*sin(theta)
To make cordicexp and exp same you need to use:
exp(i*theta)
Remember Euler's formula.
exp(i*x) = cos(x)+i*sin(x)
3 个评论
KSSV
2021-5-11
theta = -pi:pi/4:pi ;
y1 = exp(1i*theta) ;
y2 = cordiccexp(theta) ;
figure;
hold on
plot(1:length(y1),real(y1),'r','linewidth',2.5);
plot(1:length(y2),real(y2),'*b','linewidth',2.5);
grid on
legend('exponential','cordicexp');
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 CORDIC Algorithms in MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!