Re: Can Fit give function coefficients?

• To: mathgroup at smc.vnet.net
• Subject: [mg31109] Re: [mg31091] Can Fit give function coefficients?
• From: Yas <y.tesiram at pgrad.unimelb.edu.au>
• Date: Wed, 10 Oct 2001 03:43:22 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Brett,
There is a package to be loaded

<<Statistics`NonlinearFit` or
Needs["Statistics`NonlinearFit`"].

Here is an example notebook.

Yas

In[484]:=
Needs["Statistics`NonlinearFit`"]
t1 = Transpose[{Table[i, {i, 1, 30, 1}],
Sort[Table[#^2 + #^3 & /@ Random[], {30}]]}]
pl1 = ListPlot[%]

Out[485]=
{{1, 0.0173895}, {2, 0.0452705}, {3, 0.0471224}, {4, 0.0527532}, {5,
0.0590508}, {6, 0.251541}, {7, 0.25277}, {8, 0.33263}, {9,
0.354698}, {10,
0.373157}, {11, 0.438978}, {12, 0.475671}, {13, 0.51338}, {14,
0.547329}, {15, 0.578411}, {16, 0.633263}, {17, 0.637261}, {18,
0.648054}, {19, 0.708385}, {20, 0.711827}, {21, 0.721435}, {22,
0.72521}, {23, 0.728441}, {24, 0.748109}, {25, 0.84003}, {26,
0.852321}, {27, 0.899275}, {28, 0.906972}, {29, 0.924361}, {30,
0.962291}}

From In[484]:=
GraphicsData["PostScript", "\<\
%!
%%Creator: Mathematica
%%AspectRatio: .61803
MathPictureStart
/Mabs {
Mgmatrix idtransform
Mtmatrix dtransform
} bind def
exch } bind def
%% Graphics
%%IncludeResource: font Courier
%%IncludeFont: Courier
/Courier findfont 10  scalefont  setfont
% Scaling calculations
0.0238095 0.031746 0.0147151 0.61167 [
[.18254 .00222 -3 -9 ]
[.18254 .00222 3 0 ]
[.34127 .00222 -6 -9 ]
[.34127 .00222 6 0 ]
[.5 .00222 -6 -9 ]
[.5 .00222 6 0 ]
[.65873 .00222 -6 -9 ]
[.65873 .00222 6 0 ]
[.81746 .00222 -6 -9 ]
[.81746 .00222 6 0 ]
[.97619 .00222 -6 -9 ]
[.97619 .00222 6 0 ]
[.01131 .13705 -18 -4.5 ]
[.01131 .13705 0 4.5 ]
[.01131 .25938 -18 -4.5 ]
[.01131 .25938 0 4.5 ]
[.01131 .38172 -18 -4.5 ]
[.01131 .38172 0 4.5 ]
[.01131 .50405 -18 -4.5 ]
[.01131 .50405 0 4.5 ]
[ 0 0 0 0 ]
[ 1 .61803 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
0 g
.25 Mabswid
[ ] 0 setdash
.18254 .01472 m
.18254 .02097 L
s
[(5)] .18254 .00222 0 1 Mshowa
.34127 .01472 m
.34127 .02097 L
s
[(10)] .34127 .00222 0 1 Mshowa
.5 .01472 m
.5 .02097 L
s
[(15)] .5 .00222 0 1 Mshowa
.65873 .01472 m
.65873 .02097 L
s
[(20)] .65873 .00222 0 1 Mshowa
.81746 .01472 m
.81746 .02097 L
s
[(25)] .81746 .00222 0 1 Mshowa
.97619 .01472 m
.97619 .02097 L
s
[(30)] .97619 .00222 0 1 Mshowa
.125 Mabswid
.05556 .01472 m
.05556 .01847 L
s
.0873 .01472 m
.0873 .01847 L
s
.11905 .01472 m
.11905 .01847 L
s
.15079 .01472 m
.15079 .01847 L
s
.21429 .01472 m
.21429 .01847 L
s
.24603 .01472 m
.24603 .01847 L
s
.27778 .01472 m
.27778 .01847 L
s
.30952 .01472 m
.30952 .01847 L
s
.37302 .01472 m
.37302 .01847 L
s
.40476 .01472 m
.40476 .01847 L
s
.43651 .01472 m
.43651 .01847 L
s
.46825 .01472 m
.46825 .01847 L
s
.53175 .01472 m
.53175 .01847 L
s
.56349 .01472 m
.56349 .01847 L
s
.59524 .01472 m
.59524 .01847 L
s
.62698 .01472 m
.62698 .01847 L
s
.69048 .01472 m
.69048 .01847 L
s
.72222 .01472 m
.72222 .01847 L
s
.75397 .01472 m
.75397 .01847 L
s
.78571 .01472 m
.78571 .01847 L
s
.84921 .01472 m
.84921 .01847 L
s
.88095 .01472 m
.88095 .01847 L
s
.9127 .01472 m
.9127 .01847 L
s
.94444 .01472 m
.94444 .01847 L
s
.25 Mabswid
0 .01472 m
1 .01472 L
s
.02381 .13705 m
.03006 .13705 L
s
[(0.2)] .01131 .13705 1 0 Mshowa
.02381 .25938 m
.03006 .25938 L
s
[(0.4)] .01131 .25938 1 0 Mshowa
.02381 .38172 m
.03006 .38172 L
s
[(0.6)] .01131 .38172 1 0 Mshowa
.02381 .50405 m
.03006 .50405 L
s
[(0.8)] .01131 .50405 1 0 Mshowa
.125 Mabswid
.02381 .0453 m
.02756 .0453 L
s
.02381 .07588 m
.02756 .07588 L
s
.02381 .10647 m
.02756 .10647 L
s
.02381 .16763 m
.02756 .16763 L
s
.02381 .19822 m
.02756 .19822 L
s
.02381 .2288 m
.02756 .2288 L
s
.02381 .28997 m
.02756 .28997 L
s
.02381 .32055 m
.02756 .32055 L
s
.02381 .35113 m
.02756 .35113 L
s
.02381 .4123 m
.02756 .4123 L
s
.02381 .44288 m
.02756 .44288 L
s
.02381 .47347 m
.02756 .47347 L
s
.02381 .53463 m
.02756 .53463 L
s
.02381 .56522 m
.02756 .56522 L
s
.02381 .5958 m
.02756 .5958 L
s
.25 Mabswid
.02381 0 m
.02381 .61803 L
s
0 0 m
1 0 L
1 .61803 L
0 .61803 L
closepath
clip
newpath
.008 w
.05556 .02535 Mdot
.0873 .04241 Mdot
.11905 .04354 Mdot
.15079 .04698 Mdot
.18254 .05083 Mdot
.21429 .16857 Mdot
.24603 .16933 Mdot
.27778 .21817 Mdot
.30952 .23167 Mdot
.34127 .24296 Mdot
.37302 .28322 Mdot
.40476 .30567 Mdot
.43651 .32873 Mdot
.46825 .3495 Mdot
.5 .36851 Mdot
.53175 .40206 Mdot
.56349 .40451 Mdot
.59524 .41111 Mdot
.62698 .44801 Mdot
.65873 .45012 Mdot
.69048 .45599 Mdot
.72222 .4583 Mdot
.75397 .46028 Mdot
.78571 .47231 Mdot
.81746 .52854 Mdot
.84921 .53605 Mdot
.88095 .56477 Mdot
.9127 .56948 Mdot
.94444 .58012 Mdot
.97619 .60332 Mdot
% End of Graphics
MathPictureEnd
\
\>"]

Out[486]=
\[SkeletonIndicator]Graphics\[SkeletonIndicator]

In[496]:=

y1[x_] := 2 x^2
y2[x_] := 3 x^3
pl2 = Fit[t1, {1, y1[x], y2[x]}, x]
NonlinearRegress[t1, a2 + b2  y1[x] + c2 y2[x], {x}, {a2, b2, c2}]

Out[498]=
\!\(\(\(0.09453857903123668`\)\(\[InvisibleSpace]\)\) +
0.0030640821277801255`\ x\^2 - 0.000073162991136786`\ x\^3\)

Out[499]=
\!\(\*
RowBox[{"{",
RowBox[{\(BestFitParameters -> {a2 -> 0.09453857903123668`,
b2 -> 0.0015320410638900628`,
c2 -> \(-0.000024387663712261998`\)}\), ",",
RowBox[{"ParameterCITable", "->",
TagBox[GridBox[{
{"\<\"\"\>", "\<\"Estimate\"\>", "\<\"Asymptotic SE\"\>", \
"\<\"CI\"\>"},
{"a2", "0.09453857903123668`",
"0.02396445620841166`", \({0.0453675764719623`,
0.14370958159051106`}\)},
{"b2", "0.0015320410638900628`",
"0.000127923148862615`", \({0.0012695644432894997`,
0.0017945176844906259`}\)},
{"c2", \(-0.000024387663712261998`\),
"2.9307888995799406`*^-6", \({\
(-0.00003040114581378178`\), \
\(-0.000018374181610742216`\)}\)}
},
RowSpacings->1,
ColumnSpacings->3,
RowAlignments->Baseline,
ColumnAlignments->{Left}],
(
TableForm[ #, TableDepth -> 2, TableHeadings -> {{a2, b2,
c2}, {
"Estimate", "Asymptotic SE", "CI"}}]&)]}],
",", \(EstimatedVariance -> 0.0040871397749206164`\), ",",
RowBox[{"ANOVATable", "->",
InterpretationBox[GridBox[{
{"\<\"\"\>", "\<\"DF\"\>", "\<\"SumOfSq\"\>", \
"\<\"MeanSq\"\>"},
{"\<\"Model\"\>", "3", "10.936143801509989`",
"3.6453812671699963`"},
{"\<\"Error\"\>", "27", "0.11035277392285664`",
"0.0040871397749206164`"},
{"\<\"Uncorrected Total\"\>", "30",
"11.046496575432846`", "\<\"\"\>"},
{"\<\"Corrected Total\"\>", "29",
"2.526612732523257`", "\<\"\"\>"}
},
RowSpacings->1,
ColumnSpacings->3,
RowAlignments->Baseline,
ColumnAlignments->{Left}],

TableForm[ {{3, 10.936143801509989, 3.6453812671699963}, {27,
0.11035277392285664, 0.0040871397749206164}, {30,
11.046496575432846}, {29, 2.5266127325232568}},
TableHeadings -> {{"Model", "Error", "Uncorrected Total",
"Corrected Total"}, {"DF", "SumOfSq", "MeanSq"}}]]}], ",",
RowBox[{"AsymptoticCorrelationMatrix", "->",
TagBox[
RowBox[{"(", "\[NoBreak]", GridBox[{
{"1.0000000000000002`", \(-0.7566035665827959`\),
"0.6742626725799722`"},
{\(-0.756603566582796`\),
"0.9999999999999998`", \(-0.986297337586299`\)},
{"0.6742626725799722`", \(-0.986297337586299`\),
"0.9999999999999999`"}
}], "\[NoBreak]", ")"}],
(MatrixForm[ #]&)]}], ",",
RowBox[{"FitCurvatureTable", "->",
TagBox[GridBox[{
{"\<\"\"\>", "\<\"Curvature\"\>"},
{"\<\"Max Intrinsic\"\>", "0"},
{"\<\"Max Parameter-Effects\"\>", "0"},
{"\<\"95. % Confidence Region\"\>", "0.5812037036002692`"}
},
RowSpacings->1,
ColumnSpacings->3,
RowAlignments->Baseline,
ColumnAlignments->{Left}],
(
TableForm[ #, TableDepth -> 2, TableHeadings -> {{"Max
Intrinsic",
"Max Parameter-Effects", "95. % Confidence Region"}, {
"Curvature"}}]&)]}]}], "}"}]\)

In[526]:=
pl3 = Plot[
0.09453857903123668\[InvisibleSpace]+ 0.0030640821277801255 y1[x] -
0.000073162991136786 y2[x], {x, 1, 30}, PlotStyle -> RGBColor[1,
0, 0]]
pl4 = Plot[
0.09453857903123668 + 0.0015320410638900628 y1[x] -
0.000024387663712261998 y2[x], {x, 1, 30},
PlotStyle -> RGBColor[0, 0, 1]]

From In[526]:=
GraphicsData["PostScript", "\<\
%!
%%Creator: Mathematica
%%AspectRatio: .61803
MathPictureStart
/Mabs {
Mgmatrix idtransform
Mtmatrix dtransform
} bind def
exch } bind def
%% Graphics
%%IncludeResource: font Courier
%%IncludeFont: Courier
/Courier findfont 10  scalefont  setfont
% Scaling calculations
0.0238095 0.031746 0.181163 0.526209 [
[.18254 .16866 -3 -9 ]
[.18254 .16866 3 0 ]
[.34127 .16866 -6 -9 ]
[.34127 .16866 6 0 ]
[.5 .16866 -6 -9 ]
[.5 .16866 6 0 ]
[.65873 .16866 -6 -9 ]
[.65873 .16866 6 0 ]
[.81746 .16866 -6 -9 ]
[.81746 .16866 6 0 ]
[.97619 .16866 -6 -9 ]
[.97619 .16866 6 0 ]
[.01131 .07592 -24 -4.5 ]
[.01131 .07592 0 4.5 ]
[.01131 .28641 -18 -4.5 ]
[.01131 .28641 0 4.5 ]
[.01131 .39165 -18 -4.5 ]
[.01131 .39165 0 4.5 ]
[.01131 .49689 -18 -4.5 ]
[.01131 .49689 0 4.5 ]
[.01131 .60213 -18 -4.5 ]
[.01131 .60213 0 4.5 ]
[ 0 0 0 0 ]
[ 1 .61803 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
0 g
.25 Mabswid
[ ] 0 setdash
.18254 .18116 m
.18254 .18741 L
s
[(5)] .18254 .16866 0 1 Mshowa
.34127 .18116 m
.34127 .18741 L
s
[(10)] .34127 .16866 0 1 Mshowa
.5 .18116 m
.5 .18741 L
s
[(15)] .5 .16866 0 1 Mshowa
.65873 .18116 m
.65873 .18741 L
s
[(20)] .65873 .16866 0 1 Mshowa
.81746 .18116 m
.81746 .18741 L
s
[(25)] .81746 .16866 0 1 Mshowa
.97619 .18116 m
.97619 .18741 L
s
[(30)] .97619 .16866 0 1 Mshowa
.125 Mabswid
.05556 .18116 m
.05556 .18491 L
s
.0873 .18116 m
.0873 .18491 L
s
.11905 .18116 m
.11905 .18491 L
s
.15079 .18116 m
.15079 .18491 L
s
.21429 .18116 m
.21429 .18491 L
s
.24603 .18116 m
.24603 .18491 L
s
.27778 .18116 m
.27778 .18491 L
s
.30952 .18116 m
.30952 .18491 L
s
.37302 .18116 m
.37302 .18491 L
s
.40476 .18116 m
.40476 .18491 L
s
.43651 .18116 m
.43651 .18491 L
s
.46825 .18116 m
.46825 .18491 L
s
.53175 .18116 m
.53175 .18491 L
s
.56349 .18116 m
.56349 .18491 L
s
.59524 .18116 m
.59524 .18491 L
s
.62698 .18116 m
.62698 .18491 L
s
.69048 .18116 m
.69048 .18491 L
s
.72222 .18116 m
.72222 .18491 L
s
.75397 .18116 m
.75397 .18491 L
s
.78571 .18116 m
.78571 .18491 L
s
.84921 .18116 m
.84921 .18491 L
s
.88095 .18116 m
.88095 .18491 L
s
.9127 .18116 m
.9127 .18491 L
s
.94444 .18116 m
.94444 .18491 L
s
.25 Mabswid
0 .18116 m
1 .18116 L
s
.02381 .07592 m
.03006 .07592 L
s
[(-0.2)] .01131 .07592 1 0 Mshowa
.02381 .28641 m
.03006 .28641 L
s
[(0.2)] .01131 .28641 1 0 Mshowa
.02381 .39165 m
.03006 .39165 L
s
[(0.4)] .01131 .39165 1 0 Mshowa
.02381 .49689 m
.03006 .49689 L
s
[(0.6)] .01131 .49689 1 0 Mshowa
.02381 .60213 m
.03006 .60213 L
s
[(0.8)] .01131 .60213 1 0 Mshowa
.125 Mabswid
.02381 .10223 m
.02756 .10223 L
s
.02381 .12854 m
.02756 .12854 L
s
.02381 .15485 m
.02756 .15485 L
s
.02381 .20747 m
.02756 .20747 L
s
.02381 .23378 m
.02756 .23378 L
s
.02381 .26009 m
.02756 .26009 L
s
.02381 .31272 m
.02756 .31272 L
s
.02381 .33903 m
.02756 .33903 L
s
.02381 .36534 m
.02756 .36534 L
s
.02381 .41796 m
.02756 .41796 L
s
.02381 .44427 m
.02756 .44427 L
s
.02381 .47058 m
.02756 .47058 L
s
.02381 .5232 m
.02756 .5232 L
s
.02381 .54951 m
.02756 .54951 L
s
.02381 .57582 m
.02756 .57582 L
s
.02381 .04961 m
.02756 .04961 L
s
.02381 .0233 m
.02756 .0233 L
s
.25 Mabswid
.02381 0 m
.02381 .61803 L
s
0 0 m
1 0 L
1 .61803 L
0 .61803 L
closepath
clip
newpath
1 0 0 r
.5 Mabswid
.05556 .23402 m
.07374 .23844 L
.0929 .24499 L
.13363 .26472 L
.17042 .28831 L
.20958 .31819 L
.24727 .35041 L
.28734 .38705 L
.32594 .42342 L
.36307 .45823 L
.40257 .49379 L
.44061 .52538 L
.47719 .55219 L
.51613 .57568 L
.53405 .5844 L
.55361 .5922 L
.56421 .59562 L
.57404 .59827 L
.58344 .6003 L
.58866 .60121 L
.59346 .60191 L
.5983 .60247 L
.6034 .60292 L
.60606 .60308 L
.60853 .6032 L
.60995 .60325 L
.61125 .60328 L
.61196 .6033 L
.61274 .60331 L
.61348 .60332 L
.61416 .60332 L
.61527 .60332 L
.61648 .60331 L
.61761 .60329 L
.61865 .60327 L
.61981 .60324 L
.62107 .60319 L
.62361 .60306 L
.62613 .6029 L
.62882 .60267 L
.63366 .60215 L
.63881 .60141 L
.64356 .60057 L
.65429 .59808 L
.66375 .5952 L
.67377 .59142 L
.69269 .58215 L
.7104 .57086 L
.74793 .538 L
.78783 .4887 L
Mistroke
.82626 .42594 L
.86323 .35029 L
.90257 .25207 L
.94045 .13905 L
.97619 .01472 L
Mfstroke
% End of Graphics
MathPictureEnd
\
\>"]

From In[526]:=
GraphicsData["PostScript", "\<\
%!
%%Creator: Mathematica
%%AspectRatio: .61803
MathPictureStart
/Mabs {
Mgmatrix idtransform
Mtmatrix dtransform
} bind def
exch } bind def
%% Graphics
%%IncludeResource: font Courier
%%IncludeFont: Courier
/Courier findfont 10  scalefont  setfont
% Scaling calculations
0.0238095 0.031746 0.0147151 0.660815 [
[.18254 .00222 -3 -9 ]
[.18254 .00222 3 0 ]
[.34127 .00222 -6 -9 ]
[.34127 .00222 6 0 ]
[.5 .00222 -6 -9 ]
[.5 .00222 6 0 ]
[.65873 .00222 -6 -9 ]
[.65873 .00222 6 0 ]
[.81746 .00222 -6 -9 ]
[.81746 .00222 6 0 ]
[.97619 .00222 -6 -9 ]
[.97619 .00222 6 0 ]
[.01131 .14688 -18 -4.5 ]
[.01131 .14688 0 4.5 ]
[.01131 .27904 -18 -4.5 ]
[.01131 .27904 0 4.5 ]
[.01131 .4112 -18 -4.5 ]
[.01131 .4112 0 4.5 ]
[.01131 .54337 -18 -4.5 ]
[.01131 .54337 0 4.5 ]
[ 0 0 0 0 ]
[ 1 .61803 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
0 g
.25 Mabswid
[ ] 0 setdash
.18254 .01472 m
.18254 .02097 L
s
[(5)] .18254 .00222 0 1 Mshowa
.34127 .01472 m
.34127 .02097 L
s
[(10)] .34127 .00222 0 1 Mshowa
.5 .01472 m
.5 .02097 L
s
[(15)] .5 .00222 0 1 Mshowa
.65873 .01472 m
.65873 .02097 L
s
[(20)] .65873 .00222 0 1 Mshowa
.81746 .01472 m
.81746 .02097 L
s
[(25)] .81746 .00222 0 1 Mshowa
.97619 .01472 m
.97619 .02097 L
s
[(30)] .97619 .00222 0 1 Mshowa
.125 Mabswid
.05556 .01472 m
.05556 .01847 L
s
.0873 .01472 m
.0873 .01847 L
s
.11905 .01472 m
.11905 .01847 L
s
.15079 .01472 m
.15079 .01847 L
s
.21429 .01472 m
.21429 .01847 L
s
.24603 .01472 m
.24603 .01847 L
s
.27778 .01472 m
.27778 .01847 L
s
.30952 .01472 m
.30952 .01847 L
s
.37302 .01472 m
.37302 .01847 L
s
.40476 .01472 m
.40476 .01847 L
s
.43651 .01472 m
.43651 .01847 L
s
.46825 .01472 m
.46825 .01847 L
s
.53175 .01472 m
.53175 .01847 L
s
.56349 .01472 m
.56349 .01847 L
s
.59524 .01472 m
.59524 .01847 L
s
.62698 .01472 m
.62698 .01847 L
s
.69048 .01472 m
.69048 .01847 L
s
.72222 .01472 m
.72222 .01847 L
s
.75397 .01472 m
.75397 .01847 L
s
.78571 .01472 m
.78571 .01847 L
s
.84921 .01472 m
.84921 .01847 L
s
.88095 .01472 m
.88095 .01847 L
s
.9127 .01472 m
.9127 .01847 L
s
.94444 .01472 m
.94444 .01847 L
s
.25 Mabswid
0 .01472 m
1 .01472 L
s
.02381 .14688 m
.03006 .14688 L
s
[(0.2)] .01131 .14688 1 0 Mshowa
.02381 .27904 m
.03006 .27904 L
s
[(0.4)] .01131 .27904 1 0 Mshowa
.02381 .4112 m
.03006 .4112 L
s
[(0.6)] .01131 .4112 1 0 Mshowa
.02381 .54337 m
.03006 .54337 L
s
[(0.8)] .01131 .54337 1 0 Mshowa
.125 Mabswid
.02381 .04776 m
.02756 .04776 L
s
.02381 .0808 m
.02756 .0808 L
s
.02381 .11384 m
.02756 .11384 L
s
.02381 .17992 m
.02756 .17992 L
s
.02381 .21296 m
.02756 .21296 L
s
.02381 .246 m
.02756 .246 L
s
.02381 .31208 m
.02756 .31208 L
s
.02381 .34512 m
.02756 .34512 L
s
.02381 .37816 m
.02756 .37816 L
s
.02381 .44424 m
.02756 .44424 L
s
.02381 .47729 m
.02756 .47729 L
s
.02381 .51033 m
.02756 .51033 L
s
.02381 .57641 m
.02756 .57641 L
s
.02381 .60945 m
.02756 .60945 L
s
.25 Mabswid
.02381 0 m
.02381 .61803 L
s
0 0 m
1 0 L
1 .61803 L
0 .61803 L
closepath
clip
newpath
0 0 1 r
.5 Mabswid
.05556 .07916 m
.06423 .08037 L
.07374 .08201 L
.0929 .08628 L
.11399 .09242 L
.13363 .09942 L
.17133 .11606 L
.21139 .13791 L
.24999 .16248 L
.28712 .1889 L
.32663 .21946 L
.36467 .25077 L
.40124 .28214 L
.44019 .31642 L
.47766 .34976 L
.51751 .38505 L
.5559 .41836 L
.59282 .44928 L
.63211 .48047 L
.66994 .50832 L
.71013 .53502 L
.74886 .55739 L
.78613 .57529 L
.80502 .58287 L
.82576 .58992 L
.84573 .59538 L
.86394 .59917 L
.87362 .60071 L
.8828 .60185 L
.88749 .6023 L
.89248 .6027 L
.89508 .60287 L
.89795 .60302 L
.90037 .60313 L
.90165 .60317 L
.90301 .60322 L
.9043 .60325 L
.90548 .60327 L
.90665 .60329 L
.90777 .60331 L
.90901 .60332 L
.91017 .60332 L
.91143 .60332 L
.91207 .60331 L
.91277 .60331 L
.91393 .60329 L
.915 .60327 L
.91739 .60321 L
.91961 .60314 L
.92172 .60305 L
Mistroke
.92672 .60276 L
.93136 .6024 L
.94188 .60125 L
.95115 .59984 L
.95988 .59817 L
.97619 .59413 L
Mfstroke
% End of Graphics
MathPictureEnd
\
\>"]

In[528]:=
Show[pl1, pl3, pl4]

From In[528]:=
GraphicsData["PostScript", "\<\
%!
%%Creator: Mathematica
%%AspectRatio: .61803
MathPictureStart
/Mabs {
Mgmatrix idtransform
Mtmatrix dtransform
} bind def
exch } bind def
%% Graphics
%%IncludeResource: font Courier
%%IncludeFont: Courier
/Courier findfont 10  scalefont  setfont
% Scaling calculations
0.0238095 0.031746 0.16033 0.460348 [
[.18254 .14783 -3 -9 ]
[.18254 .14783 3 0 ]
[.34127 .14783 -6 -9 ]
[.34127 .14783 6 0 ]
[.5 .14783 -6 -9 ]
[.5 .14783 6 0 ]
[.65873 .14783 -6 -9 ]
[.65873 .14783 6 0 ]
[.81746 .14783 -6 -9 ]
[.81746 .14783 6 0 ]
[.97619 .14783 -6 -9 ]
[.97619 .14783 6 0 ]
[.01131 .06826 -24 -4.5 ]
[.01131 .06826 0 4.5 ]
[.01131 .2524 -18 -4.5 ]
[.01131 .2524 0 4.5 ]
[.01131 .34447 -18 -4.5 ]
[.01131 .34447 0 4.5 ]
[.01131 .43654 -18 -4.5 ]
[.01131 .43654 0 4.5 ]
[.01131 .52861 -18 -4.5 ]
[.01131 .52861 0 4.5 ]
[ 0 0 0 0 ]
[ 1 .61803 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
0 g
.25 Mabswid
[ ] 0 setdash
.18254 .16033 m
.18254 .16658 L
s
[(5)] .18254 .14783 0 1 Mshowa
.34127 .16033 m
.34127 .16658 L
s
[(10)] .34127 .14783 0 1 Mshowa
.5 .16033 m
.5 .16658 L
s
[(15)] .5 .14783 0 1 Mshowa
.65873 .16033 m
.65873 .16658 L
s
[(20)] .65873 .14783 0 1 Mshowa
.81746 .16033 m
.81746 .16658 L
s
[(25)] .81746 .14783 0 1 Mshowa
.97619 .16033 m
.97619 .16658 L
s
[(30)] .97619 .14783 0 1 Mshowa
.125 Mabswid
.05556 .16033 m
.05556 .16408 L
s
.0873 .16033 m
.0873 .16408 L
s
.11905 .16033 m
.11905 .16408 L
s
.15079 .16033 m
.15079 .16408 L
s
.21429 .16033 m
.21429 .16408 L
s
.24603 .16033 m
.24603 .16408 L
s
.27778 .16033 m
.27778 .16408 L
s
.30952 .16033 m
.30952 .16408 L
s
.37302 .16033 m
.37302 .16408 L
s
.40476 .16033 m
.40476 .16408 L
s
.43651 .16033 m
.43651 .16408 L
s
.46825 .16033 m
.46825 .16408 L
s
.53175 .16033 m
.53175 .16408 L
s
.56349 .16033 m
.56349 .16408 L
s
.59524 .16033 m
.59524 .16408 L
s
.62698 .16033 m
.62698 .16408 L
s
.69048 .16033 m
.69048 .16408 L
s
.72222 .16033 m
.72222 .16408 L
s
.75397 .16033 m
.75397 .16408 L
s
.78571 .16033 m
.78571 .16408 L
s
.84921 .16033 m
.84921 .16408 L
s
.88095 .16033 m
.88095 .16408 L
s
.9127 .16033 m
.9127 .16408 L
s
.94444 .16033 m
.94444 .16408 L
s
.25 Mabswid
0 .16033 m
1 .16033 L
s
.02381 .06826 m
.03006 .06826 L
s
[(-0.2)] .01131 .06826 1 0 Mshowa
.02381 .2524 m
.03006 .2524 L
s
[(0.2)] .01131 .2524 1 0 Mshowa
.02381 .34447 m
.03006 .34447 L
s
[(0.4)] .01131 .34447 1 0 Mshowa
.02381 .43654 m
.03006 .43654 L
s
[(0.6)] .01131 .43654 1 0 Mshowa
.02381 .52861 m
.03006 .52861 L
s
[(0.8)] .01131 .52861 1 0 Mshowa
.125 Mabswid
.02381 .09128 m
.02756 .09128 L
s
.02381 .1143 m
.02756 .1143 L
s
.02381 .13731 m
.02756 .13731 L
s
.02381 .18335 m
.02756 .18335 L
s
.02381 .20637 m
.02756 .20637 L
s
.02381 .22938 m
.02756 .22938 L
s
.02381 .27542 m
.02756 .27542 L
s
.02381 .29843 m
.02756 .29843 L
s
.02381 .32145 m
.02756 .32145 L
s
.02381 .36749 m
.02756 .36749 L
s
.02381 .3905 m
.02756 .3905 L
s
.02381 .41352 m
.02756 .41352 L
s
.02381 .45956 m
.02756 .45956 L
s
.02381 .48257 m
.02756 .48257 L
s
.02381 .50559 m
.02756 .50559 L
s
.02381 .55163 m
.02756 .55163 L
s
.02381 .57464 m
.02756 .57464 L
s
.02381 .59766 m
.02756 .59766 L
s
.02381 .04524 m
.02756 .04524 L
s
.02381 .02223 m
.02756 .02223 L
s
.25 Mabswid
.02381 0 m
.02381 .61803 L
s
0 0 m
1 0 L
1 .61803 L
0 .61803 L
closepath
clip
newpath
.008 w
.05556 .16834 Mdot
.0873 .18117 Mdot
.11905 .18202 Mdot
.15079 .18462 Mdot
.18254 .18751 Mdot
.21429 .27613 Mdot
.24603 .27669 Mdot
.27778 .31346 Mdot
.30952 .32361 Mdot
.34127 .33211 Mdot
.37302 .36241 Mdot
.40476 .3793 Mdot
.43651 .39666 Mdot
.46825 .41229 Mdot
.5 .4266 Mdot
.53175 .45185 Mdot
.56349 .45369 Mdot
.59524 .45866 Mdot
.62698 .48643 Mdot
.65873 .48802 Mdot
.69048 .49244 Mdot
.72222 .49418 Mdot
.75397 .49567 Mdot
.78571 .50472 Mdot
.81746 .54704 Mdot
.84921 .55269 Mdot
.88095 .57431 Mdot
.9127 .57785 Mdot
.94444 .58586 Mdot
.97619 .60332 Mdot
1 0 0 r
.5 Mabswid
.05556 .20657 m
.07374 .21044 L
.0929 .21617 L
.13363 .23343 L
.17042 .25407 L
.20958 .28021 L
.24727 .30839 L
.28734 .34045 L
.32594 .37227 L
.36307 .40272 L
.40257 .43383 L
.44061 .46147 L
.47719 .48492 L
.51613 .50547 L
.53405 .51309 L
.55361 .51992 L
.56421 .52292 L
.57404 .52523 L
.58344 .52701 L
.58866 .5278 L
.59346 .52842 L
.5983 .52891 L
.6034 .5293 L
.60606 .52944 L
.60853 .52954 L
.60995 .52959 L
.61125 .52962 L
.61196 .52963 L
.61274 .52964 L
.61348 .52964 L
.61416 .52965 L
.61527 .52965 L
.61648 .52964 L
.61761 .52963 L
.61865 .52961 L
.61981 .52958 L
.62107 .52953 L
.62361 .52942 L
.62613 .52928 L
.62882 .52908 L
.63366 .52862 L
.63881 .52798 L
.64356 .52724 L
.65429 .52507 L
.66375 .52254 L
.67377 .51923 L
.69269 .51113 L
.7104 .50125 L
.74793 .47251 L
.78783 .42938 L
Mistroke
.82626 .37447 L
.86323 .30829 L
.90257 .22236 L
.94045 .12349 L
.97619 .01472 L
Mfstroke
0 0 1 r
.05556 .20523 m
.06423 .20607 L
.07374 .20721 L
.0929 .21019 L
.11399 .21446 L
.13363 .21934 L
.17133 .23093 L
.21139 .24615 L
.24999 .26327 L
.28712 .28167 L
.32663 .30296 L
.36467 .32477 L
.40124 .34663 L
.44019 .37051 L
.47766 .39373 L
.51751 .41832 L
.5559 .44152 L
.59282 .46307 L
.63211 .4848 L
.66994 .5042 L
.71013 .5228 L
.74886 .53838 L
.78613 .55085 L
.80502 .55613 L
.82576 .56104 L
.84573 .56484 L
.86394 .56749 L
.87362 .56856 L
.8828 .56935 L
.88749 .56967 L
.89248 .56994 L
.89508 .57006 L
.89795 .57017 L
.90037 .57024 L
.90165 .57027 L
.90301 .5703 L
.9043 .57033 L
.90547 .57034 L
.90665 .57036 L
.90777 .57037 L
.90901 .57037 L
.91017 .57037 L
.91143 .57037 L
.91207 .57037 L
.91277 .57036 L
.91393 .57035 L
.915 .57034 L
.91739 .5703 L
.91961 .57025 L
.92171 .57019 L
Mistroke
.92672 .56999 L
.93136 .56973 L
.94188 .56893 L
.95115 .56795 L
.95988 .56678 L
.97619 .56397 L
Mfstroke
% End of Graphics
MathPictureEnd
\
\>"]

On Tuesday, October 9, 2001, at 03:55 PM, Brett Patterson wrote:

> I have a set of functions that I wish to fit to some data.
> Is there a way to succinctly get Mathematica to give me
> the coefficients of these functions in the fit.
>
> For example, say I have
> f1[x_] := 2 x^2
> f2[x_] := 3 x^3
>
> Normally, if I say: Fit[data, {1, f1[x], f2[x]}, x]
> I get a result in the form: a1 + b1 x^2 + c1 x^3,
> but I want a result of the form: a2 + b2 f1[x] + c2 f1[x].
> In this case, a2 = a1, b2 = b1/2, and c2 = c1/3.
>
> Is this possible?
>
> Regards,
> Brett Patterson
>

```

• Prev by Date: Re: Multiple scales for Y axis of plot?
• Next by Date: JSP to MSP
• Previous by thread: Re: Can Fit give function coefficients?
• Next by thread: Re: Can Fit give function coefficients?