MathGroup Archive 2004

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

Search the Archive

Re: Interpolating matrix

In article <btndag$37$1 at>,
 Zsolt Regaly <rezso at> 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]; 


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 

  • 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