MathGroup Archive 2005

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

Search the Archive

Re: Function Fit to 3D data set

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57758] Re: Function Fit to 3D data set
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 7 Jun 2005 05:59:47 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <d83eh8$o6e$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

a) use TriangularSufacePlot[] from
<<DiscreteMath`ComputationalGeometry`

TriangularSurfacePlot[data3D]

b)

points = {{1, 1, 1}, {1, 2, 4}, {1, 4, 16}}
f1 = FindFit[points,
       a + b*x^0 * y^1 + c*x^0 *y^2 + k*x^2 *y^0 + 
l*x^2 * y^1,

       {a, b, c, k, l}, { x, y}]

work as expected.

Regards

  Jens


"Adrienne R" <roehrich at unlserve.unl.edu> schrieb 
im Newsbeitrag news:d83eh8$o6e$1 at smc.vnet.net...
>I have been trying to do several analyses with an 
>[x,y,z] data set, where z is dependent on x and 
>y.  First, I tried a 3D plot.  However, the only 
>way I was able to get Mathematica to plot my data 
>was to assume a grid form for x and y, and use 
>ListPlot3D.  First question: can Mathematica make 
>a 3D plot from stated x,y,z points?
>
> Secondly, I am trying to fit a function to the 
> data.  I have determined a function to which to 
> fit parameters.  However, Mathematica does not 
> seem to want to accept y as a variable.  Here is 
> a simple suggestion of what I was trying.  Note, 
> my function is much more complicated.  Please 
> also ignore if the given does not work as 
> stated, as I'm making it up.
>
> points = {{1, 1, 1}, {1, 2, 4}, {1, 4, 16}}
> f1 = FindFit[points, a + b*x^0 * y^1 + c*x^0 
> *y^2 +k*x^2 *y^0 + l*x^2 * y^1, {a, b, c, k, l}, 
> x, y]
>
> The error I receive is \!\(\*
>  RowBox[{\(FindFit::"nonopt
>  "\), \(\(:\)\(\ \)\), "\<\"Options expected (
>    instead of \\!\\(y\\)) beyond
>      position \\!\\(4\\) in 
> \\!\\(\[LeftSkeleton] 1 \[RightSkeleton]\\). An 
> \
> option must be a rule or a list of rules. 
> \\!\\(\\*ButtonBox[\\\"Moreâ?¦\\\", \
> ButtonStyle->\\\"RefGuideLinkText\\\", 
> ButtonFrame->None, \
> ButtonData:>\\\"General::nonopt\\\"]\\)\"\>"}]\)
>
> Second question: Can Mathematica take a set of 
> x,y,z data where z is dependent on x and y and 
> fit a function to it?
>
> Secondary question for both: How?
>
> Thanks for the help!
> 



  • Prev by Date: Re: Re: Re: Print a selection within
  • Next by Date: Re: Quadratic Form Contours
  • Previous by thread: Re: Function Fit to 3D data set
  • Next by thread: Re: Function Fit to 3D data set