[Thread Prev][Thread Next][Index]

Re: Vector into array...



> The RESHAPE function is the hot ticket for this. An example to illustrate -->
> reshape a "vector" of length 50 into a 2D array that is 5x10:
> 
>      let my_one_D = i[i=1:50]
>      define axis/x=1:5:1 xax
>      define axis/y=1:10:1 yax
>      let my_2D = RESHAPE(my_one_D, x[gx=xax]+y[gy=yax])
>      list my_2D

Works like a charm! Thanks again, Steve. As always, you da Man!
--
Gary Strand
strandwg@ucar.edu                         http://www.cgd.ucar.edu/ccr/strandwg


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement