MathGroup Archive 2004

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

Search the Archive

Re: Interpolating matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45529] Re: Interpolating matrix
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Mon, 12 Jan 2004 02:15:39 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <btndag$37$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <btndag$37$1 at smc.vnet.net>,
 Zsolt Regaly <rezso at general.elte.hu> wrote:

> Hi
> 
> Could anybody help me to find out how can I interpolate a matrix?
> 
> Let'us have a 10x10 matrix and I'd like to make a DensityPlot by
> resolution of 100x100 for example. 

Use Interpolation. Here is some (indexed) data:

  Table[{x, y, Cos[x y]}, {x, 0, 1, 0.2}, {y, 0, 1, 0.2}]

Interpolate (after converting to a one-dimensional data list),

  cosint=Interpolation[Flatten[%, 1]]

and then plot:

 DensityPlot[cosint[x,y],{x,0,1},{y,0,1},PlotPoints->100, Mesh-> False]; 

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Wishart Distribution
  • Next by Date: Re: Convert automatic objects to literal
  • Previous by thread: Interpolating matrix
  • Next by thread: finding eigenvalues