[Ifit-users] Fitting a piecewise function
farhi
farhi at ill.fr
Sat Jun 29 09:43:11 CEST 2013
Hello Morten,
You can probably try something like:
>> f1=gauss;
>> f2=lorz;
>> f3 = (f1.*'x>=0') + (f2.*'x<=0')
where we first set the two separate functions, then assemble them with
a multiplication with a boolean on the 'x' axis values, and add the two
parts.
then f3 is what you need.
Emmanuel.
Le 2013-06-28 11:35, Sales, Morten a écrit :
> Dear iFit users
>
> I have a dataset that I would like to fit, and I was hoping that I
> might be able to get help from this mailing list.
>
> I would like to fit a piecewise function, so for one x-range, the
> data should be fitted by function 1, for the the next x-range it
> should be function 2, etc.
>
> The functions are 'knotted' together so that the end point of one
> function corresponds to the start point of the next.
>
> Among the fitted parameters I would also like to have the length of
> an x-range where the function is constant.
>
> Is this something I can do with iFit?
> (I run iFit-1.3.1a in MatLab R2012a in Mac OS X 10.7.5)
>
> Best Regards,
> Morten Sales
>
> ________________________________
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
>
> Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch,
> stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas
> Frederking
>
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> http://www.helmholtz-berlin.de
> _______________________________________________
> Ifit-users mailing list
> Ifit-users at mccode.org
> http://mailman.mccode.org/cgi-bin/mailman/listinfo/ifit-users
--
FARHI Emmanuel <farhi at ill.fr>
Groupe DS/CS, ILL4/156, Tel (33) 4 76 20 71 35
ILL, Grenoble
More information about the ifit-users
mailing list