Re: [OctDev] creating an matrix from C++ array

2009-04-03 Thread David Bateman
Martijn Brouwer wrote: > Hi, > I would like to create an octave matrix (of uint16) from an C++ array, > but there is apparently no constructor that accepts this: > > unsigned a[11]; > for(int i=0; i<11; i++) > { a[i]=i; > } > uint16NDArray A(a,11); > > Do I have

[OctDev] creating an matrix from C++ array

2009-04-03 Thread Martijn Brouwer
Hi, I would like to create an octave matrix (of uint16) from an C++ array, but there is apparently no constructor that accepts this: unsigned a[11]; for(int i=0; i<11; i++) { a[i]=i; } uint16NDArray A(a,11); Do I have to loop over all elements or is t