[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem about returning a matrix
From: |
ozalpi |
Subject: |
Re: problem about returning a matrix |
Date: |
Tue, 7 Apr 2009 11:39:44 -0700 (PDT) |
that helps me thank you very much :)
Carlo de Falco-2 wrote:
>
> 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.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>
--
View this message in context:
http://www.nabble.com/problem-about-returning-a-matrix-tp22927469p22935366.html
Sent from the Octave - General mailing list archive at Nabble.com.