Re: Fwd: How to run a loop to fill up a one-dimensional array?

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 20 2013 - 16:00:57 MDT

Maybe something like:

    x_avg(i) = dim_avg(y_avg(0,i,:))

is what was intended?

On Aug 20, 2013, at 3:54 PM, Jenny Hung <jhung@geol.sc.edu> wrote:

> Hi all,
> I am trying to fill up a one-dimensional array with n different values by running a loop.
> Please help me with the following code, as I only got the array filled up with the SAME value n times.
>
> x_avg = new ((n),float,"No_FillValue")
> do i=0,n-1
> x_avg = dim_avg(y_avg(0,i,:));
>
> end do
> Thanks!
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 20 16:01:13 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 21 2013 - 13:54:15 MDT