MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: nonlinearfit for data with errors in both coordinates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112190] Re: nonlinearfit for data with errors in both coordinates
  • From: Matthias Bode <lvsaba at hotmail.com>
  • Date: Sat, 4 Sep 2010 03:59:51 -0400 (EDT)

Hola Ruth,

do you want this:

Basic*Examples*1

Needs["ErrorBarPlots`"]

Error bars display as intersecting lines by default:

ErrorListPlot[{{{1, 1}, ErrorBar[0.2, 0.3]}, {{2, 2},
   ErrorBar[0.2, 0.3]},
     {{3, 4}, ErrorBar[0.2, 0.5]}, {{4, 8}, ErrorBar[1, 2]}},
   ErrorBarFunction -> Automatic]

ErrorBarFunction can be used to show error regions as rectangles:

ErrorListPlot[{{{1, 1}, ErrorBar[0.2, 0.3]}, {{2, 2},
   ErrorBar[0.2, 0.3]},
     {{3, 4}, ErrorBar[0.2, 0.5]}, {{4, 8}, ErrorBar[1, 2]}},
   ErrorBarFunction -> Function[{coords, errs},
       {Opacity[0.2], Rectangle[coords + {errs[[1, 1]], errs[[2, 1]]},
           coords + {errs[[1, 2]], errs[[2, 2]]}]}]]

??

Copied straight from the documentation.

Best regards,

MATTHIAS BODE
COCHABAMBA/BOLIVIA



> Date: Fri, 3 Sep 2010 06:07:51 -0400
> From: ruth.lazkoz at ehu.es
> Subject: [mg112163] nonlinearfit for data with errors in both coordinates
> To: mathgroup at smc.vnet.net
>
> Hi,
>
> It is not clear to me if mathematica can fit to a curve data with 
> explicit errors in both variables=B4(x,y). If this is the case, can 
> someone drop me a correct syntax line
> if my data are
>
> x=={2.0,4.0,7.0}
> and xerrors=={0.1,0.15,0.12}
> y=={8.0,16.0,15.00}
> and yerrors=={0.3,0.35,0.42}
>
> Thanks,
>
> Ruth Lazkoz
>
>
>
>
 		 	   		 



  • Prev by Date: Re: FindRoots?
  • Next by Date: Re: <Null> while building lists
  • Previous by thread: nonlinearfit for data with errors in both coordinates
  • Next by thread: Re: nonlinearfit for data with errors in both coordinates