Fitting coeff. inside of a Matrix using NonLinear fit,
- To: mathgroup at smc.vnet.net
- Subject: [mg28949] Fitting coeff. inside of a Matrix using NonLinear fit,
- From: "J. Guillermo Sanchez" <guillerm at gugu.usal.es>
- Date: Mon, 21 May 2001 00:43:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi gurus, I have the following problem: A = {{-0.15` - a13, a21, a31}, {0.15`, -0.17` - a21, 0}, {a13, 0, -a31}}; model := MatrixExp[A t].{0.7 Exp[-0.1 t], 0, 0}; model2[t_] = model[[2]] data = {{0.`, 0.`}, {1.`, 0.073`}, {2.`, 0.099`}, {3.`, 0.1`}, {4.`, 0.088`}, {5.`, 0.077`}, {6.`, 0.064`}, {7.`, 0.056`}, {8.`, 0.043`}, {9.`, 0.039`}, {10.`, 0.028`}}; (*I wish to fit model2[t] and data using NonlinearRegress*) Needs["Statistics`NonlinearFit`"] NonlinearRegress[data , model2[t], {t}, { {a21 , 0.1}, {a13 , 0.2}, {a31, 0.4}}] It doesn't work (It takes a lot of time and return a wrong solution) However I have fitted the data using FindMinimum obtaining{a21 -> 0.1, a13 -> 0.2, a31 -> 0.04} Plot[Evaluate[model2[t] /. {a21 -> 0.1, a13 -> 0.2, a31 -> 0.04}], {t, 0, 1}, Epilog -> Map[Point, data]]