Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to add two sinusoid?

Status
Not open for further replies.

muaythai2006

Newbie level 6
Newbie level 6
Joined
Sep 3, 2005
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,392
I was asked to generate two sinusoids at the right freqnecies and add them samples by samples. The first frequencies of the first sinusoids is 1336 and other is 770.
 

1336 this is the highest frequency ...so u have to choose 2*1336 as the sampling frequency ...and sample both the sinusoids...then add them sample by sample
 

Code:
fs = your unspecified sample rate

for (n=0; n<1000; n++)
  output[n] = sin(2 * pi * 1336 * n / fs) + sin(2 * pi * 770 * n / fs);
Beep! You've just pressed "5". ;)

I hope that wasn't your homework.
 

u could use signal synthesis
 

use function generator to generate them and add them using summer of gain 1
(op-amp)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top