I usually do a[1,1,:][:] @Andreas: is there any reason I would use one over the other?
On Saturday, March 29, 2014 3:06:53 AM UTC-7, Andreas Noack Jensen wrote: > > You can do vec(a[1,1,:]) > > > 2014-03-29 10:57 GMT+01:00 paul analyst <[email protected] <javascript:> > >: > > > > whatever i'm no 1, but it is not important, > > How to slice vector b not SubArrary... > >> > >> > >> a=zeros(10,10,10) > >> for i=1:10^3 > >> a[i]=i > >> > >> end > >> > >> OK! I have 3D array. > >> > >> Now I need one vecotr from any dimension. > >> If > >> b=slice(a,1,1,:) > >> Julia return SubArray not vector ! > >> How to slice this (and other) vector from 3D array? > >> Paul > >> > > > > -- > Med venlig hilsen > > Andreas Noack Jensen >
