[CSC 335] Complex Numbers
Andrew J. Pounds
pounds_aj at mercer.edu
Tue Dec 5 16:12:53 EST 2017
In the NMR filter the $\hat{Z}$ matrix elements are built from terms
that look like
$\left(e^{-i2\pi /N}\right)$
the exponential is Euler's method for expressing a complex number
$e^{i\theta}=\cos(\theta) + i \sin(\theta)$
so in thic case $\theta=-2\pi/N$ and the complex number could be built
in fortran using
cnum = cmplx( cos(2*pi/N), -sin(2*pi/N) )
and using the GSL and C/C++ it would be something like this
gsl_complex b0 = gsl_complex_rect(cos(2*pi/N), -sin(2*pi/N) );
--
Andrew J. Pounds, Ph.D. (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
http://faculty.mercer.edu/pounds_aj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20171205/acb7983b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bggnfamaimcfddea.png
Type: image/png
Size: 558 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20171205/acb7983b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fhjpcbdipelkmbjo.png
Type: image/png
Size: 935 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20171205/acb7983b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngpcfpeonogljnki.png
Type: image/png
Size: 1344 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20171205/acb7983b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ajhlnljbnpnhekgl.png
Type: image/png
Size: 964 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20171205/acb7983b/attachment-0003.png>
More information about the csc335
mailing list