please,please!!! .....matlab wave generating

  • Follow


Please, please I need help I need to give this coursework by Monday and I'm stuck :((

Show how a 100 Hz triangle wave can be generated using Fourier
Series. The code should allow appropriate graphs to be plotted in order
to allow investigation of how the waveform changes with increasing the
number of terms in the series.

Many thanks in advance 
0
Reply orfeuszwp1 3/19/2010 5:34:05 PM

"orfeuszwp1 biskup" <orfeusz79@gmail.com> wrote in message <ho0cid$grn$1@fred.mathworks.com>...
> Please, please I need help I need to give this coursework by Monday and I'm stuck :((
> 
> Show how a 100 Hz triangle wave can be generated using Fourier
> Series. The code should allow appropriate graphs to be plotted in order
> to allow investigation of how the waveform changes with increasing the
> number of terms in the series.
> 
> Many thanks in advance 

Hi, You should show people what you have done so far to attempt this on your own.

Wayne
0
Reply Wayne 3/19/2010 5:40:19 PM


"Wayne King" <wmkingty@gmail.com> wrote in message <ho0cu3$ml6$1@fred.mathworks.com>...
> "orfeuszwp1 biskup" <orfeusz79@gmail.com> wrote in message <ho0cid$grn$1@fred.mathworks.com>...
> > Please, please I need help I need to give this coursework by Monday and I'm stuck :((
> > 
> > Show how a 100 Hz triangle wave can be generated using Fourier
> > Series. The code should allow appropriate graphs to be plotted in order
> > to allow investigation of how the waveform changes with increasing the
> > number of terms in the series.
> > 
> > Many thanks in advance 
> 
> Hi, You should show people what you have done so far to attempt this on your own.
> 
> Wayne

Well this what I have got so far 


Fs = 100;                   % triangle wave frequency
T = 1/Fs;                    
t = 0:T:10;                % Sampling frequency 
w=2*pi*Fs;
n=1;                         %nth term   
a=1;                         %amplitude

%I have found this formula for triangle wave using 
%fourier series 

 y= (8/((2*n-1)*(2*n-1)*pi*pi))*cos((2*n-1)*pi*t/2);

plot(t,y);
xlabel('time');
ylabel('Amplitude');

>it does plot a graph but I dont this that this is correct
0
Reply orfeuszwp1 3/19/2010 6:46:04 PM

"orfeuszwp1 biskup" <orfeusz79@gmail.com> wrote in message <ho0gpc$rmp$1@fred.mathworks.com>...
> "Wayne King" <wmkingty@gmail.com> wrote in message <ho0cu3$ml6$1@fred.mathworks.com>...
> > "orfeuszwp1 biskup" <orfeusz79@gmail.com> wrote in message <ho0cid$grn$1@fred.mathworks.com>...
> > > Please, please I need help I need to give this coursework by Monday and I'm stuck :((
> > > 
> > > Show how a 100 Hz triangle wave can be generated using Fourier
> > > Series. The code should allow appropriate graphs to be plotted in order
> > > to allow investigation of how the waveform changes with increasing the
> > > number of terms in the series.
> > > 
> > > Many thanks in advance 
> > 
> > Hi, You should show people what you have done so far to attempt this on your own.
> > 
> > Wayne
> 
> Well this what I have got so far 
> 
> 
> Fs = 100;                   % triangle wave frequency
> T = 1/Fs;                    
> t = 0:T:10;                % Sampling frequency 
> w=2*pi*Fs;
> n=1;                         %nth term   
> a=1;                         %amplitude
> 
> %I have found this formula for triangle wave using 
> %fourier series 
> 
>  y= (8/((2*n-1)*(2*n-1)*pi*pi))*cos((2*n-1)*pi*t/2);
> 
> plot(t,y);
> xlabel('time');
> ylabel('Amplitude');
> 
> >it does plot a graph but I dont this that this is correct

Ok, without verifying your expression for the Fourier series, think about what a Fourier series is: it is a sum of terms. However, in your code you have n=1 so you are plotting only one term in the sum. If you want your Fourier series to approximate the function of interest, you have to sum over several terms. Think about how you can obtain terms in the series for several values of n and them sum the result.

Wayne
0
Reply Wayne 3/20/2010 1:15:07 PM

3 Replies
401 Views

(page loaded in 0.052 seconds)

Similiar Articles:













7/27/2012 2:25:36 PM


Reply: