Using FindFit with constraints ??
- To: mathgroup at smc.vnet.net
- Subject: [mg75655] Using FindFit with constraints ??
- From: Alex <axel.kowald at rub.de>
- Date: Tue, 8 May 2007 05:45:28 -0400 (EDT)
Hello everybody, I saw at http://reference.wolfram.com/mathematica/ref/FindFit.html that FindFit can be used with constraints for the parameters. However when I try the example with Mathematica 5.2 I get an error. model = a Cos[=CF=89 t]; data = Table[{t, Cos[2.1 t]}, {t, 0, 10, .25}] + RandomReal[.1, 41]; fit = FindFit[data, {model, {a > 0, 1 < =CF=89 < 2}}, {a, =CF=89}, t] => FindFit::nlnum: The function value {-1. + Cos[RandomReal[0.1, 41.]] - \ 1=2E\RandomReal[0.1, 41.], \[LeftSkeleton]9\[RightSkeleton], \ [LeftSkeleton]113\ \[RightSkeleton]} is not a list of numbers with dimensions {123} at {a, =CF=89} = \ {1, 1}. What am I doing wrong ?? Alex
- Follow-Ups:
- Re: Using FindFit with constraints ??
- From: Carl Woll <carlw@wolfram.com>
- Re: Using FindFit with constraints ??