{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# ML14 - Matlab 14 Fourier Series Tian Gu Code 815 Team...

This preview shows pages 1–2. Sign up to view the full content.

Matlab 14 Fourier Series Tian Gu Code: 815 Team partner: Tielong Su Chaojun Zhang Introduction We wrote two programs called fourier series this week—Square wave and triangle wave. In this lab, we focus on how to present all the variables in a function. (I think presenting all the variables is the key to make this program correct) And we also learnt how to add functions to get a new plot. We used other stuffs we learnt before like for loop. Fourier Series I mentioned we should focus on how to set all the variables correctly. As we can see, the square wave is the sum of all the f(x) when n=1,3,5… We set the period first here: T, and we also need the input of how many sine wave we should use,k. Here we use 2 periods to show the whole image of the function. And the interval of the x points is 0.01. so we get x = 0:0.01:2*T; We set the function is y, so we can use z =y+z to get the sum of all the waves at last. So the original value of z is 0.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

ML14 - Matlab 14 Fourier Series Tian Gu Code 815 Team...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online