Current location: Hot Scripts Forums » Programming Languages » C/C++ » complex exponential


complex exponential

Reply
  #1 (permalink)  
Old 07-06-04, 10:59 AM
mitkid9 mitkid9 is offline
New Member
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
complex exponential

Hi
I need to form an nxn matrix each element of which is a complex exponential
like

e ^ (-j*2*pi*i)
where pi=3.1
i= a variable and j is the complex thing...like e^j2= cos(2)+jsin(2)

I cant implement this complex part....can some one help///
The code I have written is below for reference

#include <iostream.h>
#include <cmath>// or math.h


int i,k;
int N=64;
double pi= 3.14;
double matrix[64][64]={0};

void main()
{
for (i=0; i<N; i++)
for (k=0; k<N; k++)
{
matrix[i][k]=exp (-j*2*pi*i*k/N);
}
}

Thankyou
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
matrix exponential ASHRAF C/C++ 4 08-03-05 09:54 PM
help w/ complex query -MATCH AGAINST altlprsn PHP 0 06-05-04 07:24 PM
exponential of a matrix ASHRAF C/C++ 5 01-26-04 09:11 PM


All times are GMT -5. The time now is 04:29 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.