RE: ListPlot3D of a Square Array
- To: mathgroup at smc.vnet.net
- Subject: [mg43072] RE: [mg43056] ListPlot3D of a Square Array
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 11 Aug 2003 02:15:53 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Scott,
It looks to me as if m is just a symbol, even after you have executed the
Array statement and even if you assign values to m[1,1] etc. Send m to the
kernel and see what you get back. If it is not an array of numbers, then
ListPlot3D is going to object.
Something like the following works.
Do[m[i, j] = Cos[Pi i/5]Cos[Pi j/5], {i, 1, 5}, {j, 1, 5}]
ListPlot3D[Array[m, {5, 5}]]
Probably what you need is not Array at all but Table to generate the data
values. Check the example under ListPlot3D in Help.
data = Table[Cos[Pi i/5]Cos[Pi j/5], {i, 1, 5}, {j, 1, 5}];
ListPlot3D[data]
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
> From: Scott Guthery [mailto:sguthery at mobile-mind.com]
To: mathgroup at smc.vnet.net
>
>
> Insight into the following is appreciated:
>
> Array[m, {5,5}]
> <fill up m>
> ListPlot3D[m]
>
> ListPlot3D grumps that m is not a rectangular
> array larger than 2x2.
>
> Looks like it is to me!?!?
>
> Thanks for your help.
>
> Cheers, Scott
>