home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
MATH
/
NONLIN31.ZIP
/
SQUARE.NLR
< prev
next >
Wrap
Text File
|
1994-01-24
|
859b
|
58 lines
Title "Fit Sine Series to Square Wave";
Variables X,Y;
Parameters p0,p1,p3,p5,p7;
Angletype radians;
Function y = p0 + p1*sin(x) + p3*sin(3*x) + p5*sin(5*x) + p7*sin(7*x);
Plot;
Data;
0 1
0.384684 1
0.769369 1
1.15405 1
1.53874 1
1.92342 1
2.30811 1
2.69279 1
3.07748 1
3.46216 -1
3.84684 -1
4.23153 -1
4.61621 -1
5.0009 -1
5.38558 -1
5.77027 -1
6.15495 -1
6.53964 1
6.92432 1
7.30901 1
7.69369 1
8.07837 1
8.46306 1
8.84774 1
9.23243 1
9.61711 -1
10.0018 -1
10.3865 -1
10.7712 -1
11.1559 -1
11.5405 -1
11.9252 -1
12.3099 -1
12.6946 1
13.0793 1
13.464 1
13.8486 1
14.2333 1
14.618 1
15.0027 1
15.3874 1
15.7721 -1
16.1567 -1
16.5414 -1
16.9261 -1
17.3108 -1
17.6955 -1
18.0802 -1
18.4649 -1
18.8495 -1