problem about returning a matrix
ozalpi
berkozalp at yahoo.com
Tue Apr 7 13:39:44 CDT 2009
that helps me thank you very much :)
Carlo de Falco-2 wrote:
>
> 2009/4/7 Carlo de Falco <carlo.defalco at gmail.com>
>>
>> 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
> Help-octave at octave.org
> 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.
More information about the Help-octave
mailing list