home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / sci / math / symbolic / 3315 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.7 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!uvaarpa!concert!borg!vivaldi!frederic
  2. From: frederic@vivaldi.cs.unc.edu (Robin Fredericksen)
  3. Newsgroups: sci.math.symbolic
  4. Subject: Re: Using Mathematica to fit a surface to data(+ another Q?)
  5. Keywords: Mathematica, curve fit, surface plot
  6. Message-ID: <18476@borg.cs.unc.edu>
  7. Date: 19 Dec 92 18:15:51 GMT
  8. References: <1gst2gINNfsk@tamsun.tamu.edu>
  9. Sender: news@cs.unc.edu
  10. Organization: The University of North Carolina at Chapel Hill
  11. Lines: 74
  12.  
  13. In article <1gst2gINNfsk@tamsun.tamu.edu> bryan@kolsky.tamu.edu (Bryan Milligan) writes:
  14. >
  15. >    Is there a routine in Mathematica to fit a surface to a set of
  16. >(x,y,z) data?  I have some FEM data that I need to differenciate, and I
  17. >would like to fit a polynomial curve to the data and differenciate that
  18. >as opposed to numerically differenciating the data itself.
  19. >
  20. >--
  21. >
  22. >Bryan Milligan
  23. >Department of Aerospace Engineering
  24. >Texas A&M University
  25. >bryan@kolsky.tamu.edu  (NeXT Mail accepted)
  26.  
  27.  
  28. I use the Interpolate function to do this.  The data points have 
  29. to be on a grid in that the sample set must be complete on the
  30. axis but the sample grid can be irregular.  There can be any
  31. (unlimited?) number of dimensions to the data, and you can
  32. (with the caveat that I describe below in my own question)
  33. specify the order of the polynomial used for interpolation.
  34. I don't know whether you can use other functions (e.g. sinusoids,
  35. etc.)
  36.  
  37. Now, my problem is somewhat different, and has to do with the 
  38. Interpoate[] function, so I will ask the NET since it is directly 
  39. relevant to you if you would like to use it. :-)
  40.  
  41. ====NEW BUT RELATED QUESTION====
  42. I am using Mathematica (on a Mac) for reading in a data file
  43. with points with a non-square (non-regularly spaced) grid of points.
  44.  
  45. (i.e. sample points that look like)
  46.  
  47.     0    0        0                0
  48.     0    0        0                0
  49.  
  50.     0    0        0                0
  51.  
  52.  
  53.  
  54.     0    0        0                0
  55.  
  56.  
  57.  
  58.  
  59.  
  60.     0    0        0                0
  61.  
  62.  
  63.  
  64. I am using the Interpolate[] function that mathematica offers
  65.  
  66.     Function = Interpolate[ <datalist>, InterpolationOrder->1]
  67.  
  68.  
  69. As I understand the manual, this should create a function which 
  70. provides as output the above data with linear interpolation between 
  71. the points.  However the output that I get from this is definately 
  72. NOT a linear interpolation, but something that looks quadratic.
  73.  
  74. Can anyone tell me how to fix this?  Is there a simple work-around?
  75.  
  76. Please email responses to frederic@cs.unc.edu
  77. as well posting, if possible.
  78.  
  79. Thanks.
  80. Eric Fredericksen
  81. frederic@cs.unc.edu
  82. -- 
  83. -------------------------------------------------------------------------------
  84. Eric Fredericksen    : Insert amazingly funny or enlightening quote
  85. frederic@cs.unc.edu    : in this space here.
  86. I don't need a disclaimer, I'm a graduate student so no one cares what I say...
  87.