Joined
Last Seen
0 Reputation Points
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #107.41K
Re:
Hi, I have written a small program to calculate Fourier coefficients of square wave. [CODE] #include<iostream.h> #include<stdlib.h> int main() { int *A,*B,a,n,i,; float pi=3.14; cout<<"Enter value of amplitude"; cin>>a; cout<<"Enter which harmonic you want to display"; cin>>n; A=new int[n+1]; B=new int[n+1]; A[0]=0; for(i=0;i<=n;i++) { B[i]=0; } for(i=2;i<=n;i=i+2) { A[i]=0; } … |