Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

no, no such thing built in.

you simply set up your Mat, and fill it with numbers, maually:

Mat m(1,10,CV_64F); // 10 doubles in a single row
for (int i=0; i<10; i++)
      m.at<double>(0,i) = i; // set the column in row 0

note, that there are notorious differences between c++ and matlab, like 0 or 1 based indexing.

no, no such thing built in.

you simply set up your Mat, and fill it with numbers, maually:manually:

Mat m(1,10,CV_64F); // 10 doubles in a single row
for (int i=0; i<10; i++)
      m.at<double>(0,i) = i; // set the column in row 0

note, that there are notorious differences between c++ and matlab, like 0 or 1 based indexing.

no, no such thing built in.

you simply set up your Mat, and fill it with numbers, manually:

Mat m(1,10,CV_64F); // 10 doubles in a single row
for (int i=0; i<10; i++)
      m.at<double>(0,i) = i; // set the column in row 0

note, that there are notorious differences between c++ and matlab, like 0 or 1 based indexing.indexing, so careful !