exp( ) gives unexpected answer for (2,2) input
Show older comments
I have trouble understanding the results returned by exp():
given a= [1.4142 1.4121; 1.4142 1.4121] ;
exp(j*2*pi*a*10^3) = [0.2269 +0.9739i 0.8312+0.5560i ; 0.2269+0.9739i 0.8312+0.5560i]
but checking by elements:
exp(j*2*pi*1.4142*10^3)=0.3090+0.9511i
exp(j*2*pi*1.4121*10^3)=0.890+0.5878i
if a =[1.4142 1.4121];
then the answers agree with the element check. What am I missing?
1 Comment
James Tursa
on 2 Sep 2022
Edited: James Tursa
on 2 Sep 2022
Please show the actual code ... i.e., copy & paste the code and actual MATLAB output. It could be that you hand typed in numbers based on MATLAB truncated display but the actual numbers used by MATLAB are different. E.g., what does 1.4142-a(1,1) and 1.4141-a(1,2) show? Or use format longg and display the "a" matrix again.
Accepted Answer
More Answers (1)
Seems to give the expected result?
a= [1.4142 1.4121; 1.4142 1.4121]
exp(j*2*pi*a*10^3)
Categories
Find more on Trimming and Linearization 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!