Re: plotting multidimensional arrays
- To: mathgroup at smc.vnet.net
- Subject: [mg69591] Re: [mg69547] plotting multidimensional arrays
- From: bsyehuda at gmail.com
- Date: Sat, 16 Sep 2006 03:50:40 -0400 (EDT)
cc[[1]] is a list representing the first row of your table. Not that this is
not a variable anymore.
cc[[1]][[2]] is the second element of the returned value of the first row,
so you are practically try to assign a value to something that is not a
variable.
simply use
cc[[1,2]]=20. This will work for you.
you can also use ReplacePart if you need
cc=ReplacePart[cc,20,{1,2}]
good luck
yehuda
On 9/15/06, mickey <micky at hotmail.com> wrote:
>
> Hi,
>
> I have a list of numbers,
> cc(1,2)=20
> cc(1,3)=45
>
> and so on. I would like to plot it as a 3 dimensional plot, with the
> index as x and y and the value as the z value but I am having trouble
> doing that. Here is what I was trying. I create the array first,
>
> cc=Table[0,{i,500},{j,500}];
>
> This works fine. Then I assign the values for the elements.
>
> cc[[1]][[2]]=20;
>
> But here I get an error.
>
> What am I doing wrong?
>
> THanks,
> -M
>
>