Code covered by the BSD License  

Highlights from
fseriedemo

5.0

5.0 | 2 ratings Rate this file 14 Downloads (last 30 days) File Size: 1.92 KB File ID: #7460
image thumbnail

fseriedemo

by Matt Fig

 

16 Apr 2005 (Updated 02 Oct 2008)

Calculates and plots the Fourier Series Approximation to function f.

| Watch this File

File Information
Description

FSERIESDEMO(f,b,N)
Calculates and plots the Fourier Series Approximation to function f on (0,b) with N terms. Also plots f so that a comparison can be made.

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
19 Apr 2005 Alex H

Where was this back in the Uni days...

30 Apr 2007 Tse David C.M.

Well done, Matt !
I have successful use it to work as datapoint [y] to fourierfit [yF] {of course ppcreate needed}

[yF,A0,re,im]=f_approxv(ppcreate(1:length(y),y,'natural'),3*length(y)/pi,fix(5.8*log10(length(y))));

The story continue to fourier_function_handle [FSyf] by {fscreate needed}
FSyf=fscreate([conj(re(end:-1:1)+i*im(end:-1:1))';A0;(re+i*im)'],2*pi);FSyf('plot');

Please login to add a comment or rating.
Updates
19 Dec 2005

Allow user to enter a function that doesn't need to accept vector args.

02 Oct 2008

Added input checking.

Tag Activity for this File
Tag Applied By Date/Time
fourier Matt Fig 22 Oct 2008 07:45:55
series Matt Fig 22 Oct 2008 07:45:55
plot Matt Fig 22 Oct 2008 07:45:55
fft Matt Fig 22 Oct 2008 07:45:55
demo Bruno Luong 23 Nov 2008 15:30:39
demo Matt Fig 23 Nov 2008 15:34:29
demo Dina crofts 14 Dec 2011 23:48:48

Contact us at files@mathworks.com