problem about returning a matrix
ozalpi
berkozalp at yahoo.com
Tue Apr 7 06:54:18 CDT 2009
Hi, we want to develop a function that returns a matrix but we couldn't be
able to convert this matrix or more simply a list to an octave_value_list to
return the result. Only the first element of the matrix is seen from octave.
Can anyone help us about this problem we have?
Our code segment is:
#include <octave/oct.h>
...
...
DEFUN_DLD(...)
{
octave_value_list retval;
for(int i = 0; i < row1; i++)
{
for(int j = 0; j < column1; j++)
{
out >> x;
retval(i*column1 + j)=octave_value(x);
}
}
return retval;
}
--
View this message in context: http://www.nabble.com/problem-about-returning-a-matrix-tp22927469p22927469.html
Sent from the Octave - General mailing list archive at Nabble.com.
More information about the Help-octave
mailing list