home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Calc / MathPad 2.35.sit / Examples / interpolation < prev    next >
MacBinary  |  1994-05-30  |  1.0 KB  |  [TEXT/MPad]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: interpolation

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon May 30 23:35:30 1994, modified Mon May 30 23:35:30 1994, creator 'MPad', type ASCII, 434 bytes "interpolation" , at 0x232 342 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPad]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 69 6e 74 65 72 70 | 6f 6c 61 74 69 6f 6e 00 |..interp|olation.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 61 | 64 01 00 00 00 00 00 00 |.TEXTMPa|d.......|
|00000050| 00 00 00 00 00 01 b2 00 | 00 01 56 aa 10 61 02 aa |........|..V..a..|
|00000060| 10 61 02 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.a......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 18 78 00 00 |........|.....x..|
|00000080| 2d 2d 20 53 6f 6c 76 65 | 20 66 6f 72 20 63 6f 65 |-- Solve| for coe|
|00000090| 66 66 69 63 69 65 6e 74 | 73 20 6f 66 20 61 20 70 |fficient|s of a p|
|000000a0| 6f 6c 79 6e 6f 6d 69 61 | 6c 20 74 68 61 74 20 67 |olynomia|l that g|
|000000b0| 6f 65 73 20 74 68 72 6f | 75 67 68 20 6e 20 64 61 |oes thro|ugh n da|
|000000c0| 74 61 20 70 6f 69 6e 74 | 73 2e 0d 0d 69 6e 63 6c |ta point|s...incl|
|000000d0| 75 64 65 20 22 3a 69 6e | 63 6c 3a 73 6f 6c 76 65 |ude ":in|cl:solve|
|000000e0| 72 22 0d 0d 64 61 74 61 | 20 3d 20 72 65 61 64 28 |r"..data| = read(|
|000000f0| 78 79 64 61 74 61 29 0d | 70 6c 6f 74 20 64 61 74 |xydata).|plot dat|
|00000100| 61 5b 31 3a 6e 5d 0d 0d | 78 5b 69 5d 3d 64 61 74 |a[1:n]..|x[i]=dat|
|00000110| 61 5b 69 2c 31 5d 20 64 | 69 6d 5b 6e 5d 20 2d 2d |a[i,1] d|im[n] --|
|00000120| 20 73 65 70 61 72 61 74 | 65 20 78 20 61 6e 64 20 | separat|e x and |
|00000130| 79 0d 79 5b 69 5d 3d 64 | 61 74 61 5b 69 2c 32 5d |y.y[i]=d|ata[i,2]|
|00000140| 20 64 69 6d 5b 6e 5d 0d | 0d 66 28 78 29 5b 6a 5d | dim[n].|.f(x)[j]|
|00000150| 20 3d 20 78 5e 28 6a 2d | 31 29 20 20 2d 2d 20 70 | = x^(j-|1) -- p|
|00000160| 6f 6c 79 6e 6f 6d 69 61 | 6c 0d 0d 2d 2d 20 63 6f |olynomia|l..-- co|
|00000170| 6e 73 74 72 75 63 74 20 | 6d 61 74 72 69 78 20 75 |nstruct |matrix u|
|00000180| 73 69 6e 67 20 78 20 64 | 61 74 61 20 70 6f 69 6e |sing x d|ata poin|
|00000190| 74 73 0d 41 5b 69 2c 6a | 5d 20 3d 20 66 28 78 5b |ts.A[i,j|] = f(x[|
|000001a0| 69 5d 29 5b 6a 5d 20 64 | 69 6d 5b 6e 2c 6e 5d 0d |i])[j] d|im[n,n].|
|000001b0| 0d 2d 2d 20 73 6f 6c 76 | 65 20 66 6f 72 20 63 6f |.-- solv|e for co|
|000001c0| 65 66 66 73 20 74 68 61 | 74 20 67 69 76 65 20 79 |effs tha|t give y|
|000001d0| 20 70 6f 69 6e 74 73 0d | 63 3a 3d 73 6f 6c 76 65 | points.|c:=solve|
|000001e0| 28 41 2c 79 29 3a 0d 63 | 3a 7b 30 2e 37 39 37 2c |(A,y):.c|:{0.797,|
|000001f0| 33 2e 38 36 33 2c 2d 30 | 2e 37 31 35 2c 30 2e 30 |3.863,-0|.715,0.0|
|00000200| 35 37 2c 2d 30 2e 30 30 | 32 2c 30 2e 30 30 30 7d |57,-0.00|2,0.000}|
|00000210| 0d 0d 6e 3d 36 0d 70 6c | 6f 74 20 73 75 6d 28 28 |..n=6.pl|ot sum((|
|00000220| 63 2a 66 28 58 29 29 5b | 69 5d 2c 69 2c 31 2c 6e |c*f(X))[|i],i,1,n|
|00000230| 29 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |).......|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000280| 00 00 01 00 00 00 01 24 | 00 00 00 24 00 00 00 32 |.......$|...$...2|
|00000290| 58 d7 74 01 ff e2 51 2f | 80 01 00 9e f3 01 fe 0c |X.t...Q/|........|
|000002a0| c0 01 ff e6 58 b7 54 01 | b0 a8 48 80 01 00 88 7d |....X.T.|..H....}|
|000002b0| 0d 69 6e 74 65 72 70 6f | 6c 61 74 69 6f 6e 02 00 |.interpo|lation..|
|000002c0| 00 00 54 45 58 54 4d 50 | 61 64 01 00 00 00 01 00 |..TEXTMP|ad......|
|000002d0| 00 00 54 45 58 54 4d 50 | 61 64 01 00 00 00 01 00 |..TEXTMP|ad......|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 a8 26 74 e3 00 00 | 01 b2 00 00 01 56 60 26 |...&t...|.....V`&|
|00000300| 2d 6e 54 43 5a 01 ff de | 59 43 46 01 01 84 26 01 |-nTCZ...|YCF...&.|
|00000310| b0 45 6d a5 20 04 01 0c | 86 20 03 01 66 1c da 5f |.Em. ...|. ..f.._|
|00000320| 3c 5f 52 5a 5f 50 3a 01 | 60 30 da 5b 3c 5b 52 5a |<_RZ_P:.|`0.[<[RZ|
|00000330| 5b 50 01 24 e2 7d 56 8b | c1 37 01 01 08 26 68 71 |[P.$.}V.|.7...&hq|
|00000340| 49 3d 01 ff ea 3e 8e 01 | fe ae da 5f 15 67 34 4a |I=...>..|..._.g4J|
|00000350| 2e ff f7 67 08 20 3c 02 | 6d 6f 76 67 d3 d5 20 03 |...g. <.|movg.. .|
|00000360| 31 29 5f 3f 2a 4c 01 fa | ec 68 82 da 5b 20 05 40 |1)_?*L..|.h..[ .@|
|00000370| 01 67 67 d3 d5 40 01 61 | 67 31 29 5b 3f 2a 4c 01 |.gg..@.a|g1)[?*L.|
|00000380| 00 00 00 20 00 00 00 03 | 00 02 3f f9 8e fa 35 12 |... ....|..?...5.|
|00000390| 94 e9 c8 ae 01 0e 01 0f | 00 04 00 39 00 e5 01 1e |........|...9....|
|000003a0| 01 13 00 29 00 00 01 00 | 00 00 01 24 00 00 00 24 |...)....|...$...$|
|000003b0| 00 00 00 32 00 36 f8 9c | 08 74 00 00 00 1c 00 32 |...2.6..|.t.....2|
|000003c0| 00 00 50 52 65 66 00 00 | 00 0a 00 80 ff ff 00 00 |..PRef..|........|
|000003d0| 00 00 00 37 f1 88 00 00 | 00 00 00 00 00 00 00 00 |...7....|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+