[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem about returning a matrix
From: |
Carlo de Falco |
Subject: |
Re: problem about returning a matrix |
Date: |
Tue, 7 Apr 2009 15:40:29 +0200 |
2009/4/7 Carlo de Falco <address@hidden>
>
> this function, as it stands, returns each element of the matrix as a separate
> variable..
> I guess what you want to do is rather something like
<...>
Actually you probably want:
>
> #include <octave/oct.h>
> ...
> ...
> DEFUN_DLD(...)
> {
> Matrix A(row1, column1
> );
>
> for(int i = 0; i < row1; i++)
> {
> for(int j = 0; j < column1; j++)
> {
> out >> x;
> A(i, j)=x;
> }
> }
> return octave_value(A);
> }
>
c.