here is a code to create a list and fit it with two gaussians:
list = Join[
Table[{RandomReal[{0, 1}], RandomReal[{0, 10}]}, {i, 100}],
Table[{RandomReal[{1, 3}], RandomReal[{0, 30}]}, {i, 100}]];
fit = NonlinearModelFit[list,
A1*PDF[NormalDistribution[\[Mu]1, \[Sigma]1], t] +
A2*PDF[NormalDistribution[\[Mu]2, \[Sigma]2], t], { {A1,
15}, {\[Sigma]1, 0.5}, {\[Mu]1, 0.5}, {\[Mu]2, 1.5}, {A2,
40}, {\[Sigma]2, 1.5}}, t]
Show[ListPlot[list], Plot[fit[t], {t, -1, 5}, PlotStyle -> Red]]
I can select the first part of the fitted formula by:
Normal[fit][[1]]
But I can't plot or do numerical manipulation:
Plot[Normal[fit][[1]], {t, 0, 3}]
I know I can use /.t-> d
construct , but it is a numerically inefficient way to do when dealing with large formulas.
Any ideas?