[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
creating an matrix from C++ array
From: |
Martijn |
Subject: |
creating an matrix from C++ array |
Date: |
Sat, 04 Apr 2009 08:31:42 +0200 |
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 there a quicker way?
I want to used such construction to read a lot of uint16 data from a
file into an C++ array of unsigned shorts. Then I would like to create
an octave uint16NDArray from the array.
with kind regards,
Martijn
- creating an matrix from C++ array,
Martijn <=