On 1 October 2012 22:04, Bala subramanian wrote:
> Friends,
> I have an 1d array like a=[1, 1, 2, 2, 2, 3, 3, 1, 1, 1], i have to
> convert it to 2d array for plotting as follows. The 2d array is filled
> by a[colum index] to obtain the new array shown below.
>
> [ [ 1., 1., 0., 0., 0., 0.,
Friends,
I have an 1d array like a=[1, 1, 2, 2, 2, 3, 3, 1, 1, 1], i have to
convert it to 2d array for plotting as follows. The 2d array is filled
by a[colum index] to obtain the new array shown below.
[ [ 1., 1., 0., 0., 0., 0., 0., 1., 1., 1.],
[ 0., 0., 2., 2., 2., 0., 0., 0.