[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Include Fortran Code which Returns Arrays of Dynamic/Unknown Size
From: |
Marco2008 |
Subject: |
Include Fortran Code which Returns Arrays of Dynamic/Unknown Size |
Date: |
Wed, 8 Oct 2008 10:38:54 -0700 (PDT) |
Hello!
I would like to use some fortran subroutines from within octave. With the
documentation from the octave-homepage it works fine with an example of the
form:
...
octave_value_list retval;
Matrix M1 = Matrix(4,3);
F77_XFCN (function, FUNCTION, ( M1.fortran_vec() ) );
retval(0) = M1;
...
Here, I the size of the matrix M1 is fixed. But in some cases I do not know
before the call of the fortran subroutine what size the return value M1 has
because this size is computed inside the fortran subroutine. I tried
something like
...
octave_value_list retval;
Matrix M1;
F77_XFCN (function, FUNCTION, ( M1.fortran_vec() );
retval(0) = M1;
...
but it does not work. Therefor, I would like to know if and possibly how
that can be realized.
It should be possible by defining a very large matrix M1 in the c++-wrapper
and return additionally the actually needed size from the fortran subroutine
by an integer variable. The return value M1 then has to be resized.
But I would like to avoid this solution, because you never know what "very
large" means.
If someone had an idea, I would be very glad.
Thanks,
Marco
--
View this message in context:
http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19845758.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Include Fortran Code which Returns Arrays of Dynamic/Unknown Size,
Marco2008 <=
- Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, John W. Eaton, 2008/10/08
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Jaroslav Hajek, 2008/10/09
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/10
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, David Bateman, 2008/10/10
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/13
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, David Bateman, 2008/10/13