## 五年专注**布里斯班论文代写** 信誉保证

turnitin检测 保证原创率 高分通过

本公司成立以来，在**澳洲代写论文**领域获得了不错的口碑，98%以上的客户顺利通过..欢迎大家进行咨询和享受公司为你提供的全方位服务！不论你的英语论文有多难，deadline有多急，我们将给你带来最专业可靠的**澳洲代写论文**服务。

# SCIENTIFIC COMPUTING 澳洲代写

Exercise #3 Part – II due 22:00pm Friday 3 May

(worth 15 % for M3SC and 40% for M 4/5 SC)

Background and discussion

The discrete Real Fourier series represents the periodic real data xj at N discrete points as the sum

of N cosine and sine functions in the form :

This would be a N/2-size discrete Complex Fourier Series if yk = ak + I bk . 0 < k < N/2

Although there are purely real algorithms to calculate xj given ak and bk and vice versa, most

commonly these problems are mapped into a procedure utilizing the Discrete Complex Fourier

Series and Transform.

One of these mappings take two real periodic data sets x1j and x2j 0 < j < N and packs them

into a periodic complex data set zj = x1j + x2j · I of size N and performs the size N Discrete

Complex Fourier Series on this data set: t = CN z . The resultant complex t vector can be

unpacked into the two real size N/2 Fourier Series coefficients by exploiting the fact that for a real

data series xj , the resultant complex yk have the property: yk = y*N-k . [II-2]

For a purely imaginary set of data, the resultant complex yk have the property: yk = - y*N-k .

Thus the yk for each real data set can be recovered for 0 < k < N/2 . In detail:

y 1k = ( tk + t*N-k )/N and y 2k = -I · ( tk - t*N-k )/N 0 < k < N/2.

To recover x1j and x2j 0 < j < N , given y1k and y2k 0 < k < N/2, extend y1k and y2k from

0 < k < N/2 to 0 < k < N using relation [II-2] and then create the complex vector

wk = y1k + y2k · I for 0 < k < N and perform the Discrete Fourier Transform CN-1 w .

The real and imaginary parts of the resultant complex array are the two desired real periodic data.

8. Write the C function to calculate the Discrete Fourier Series of two real data sets, each of

size N and find the two complex vectors z1 and z2 of size N/2 of their Fourier coefficients.

This function should have the prototype:

int TwoReal2Complex(double *R1, double *R2,

complex double *Z1,complex double *Z2,

complex double *w, complex double *Wp, int N)

where: *R1 is a pointer to the type double array to hold R1 from R1[0] to R1[N-1];

*R2 is a pointer to the type double array holding R2 from R2[0] to R2[N-1];

*Z1 is a pointer to the type complex double array holding Z1 from Z1[0] to Z1[N/2];

*Z2 is a pointer to the type complex double array holding Z2 from Z2[0] to Z2[N/2];

*w is a pointer to the type double array w[0] to w[your choice!] that can be used as

vector temporary storage for intermediate complex works required by your

FastCS(… function.

*Wp is a pointer to the vector or powers of WN created in the section 1 function above

N is the size of the desired transform.)

The function should return 0 if it ‘works’ and something informative if it doesn’t work for