help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Concatonation of Matrices in octave API HOW?


From: John Weatherwax
Subject: Concatonation of Matrices in octave API HOW?
Date: Wed, 8 Jun 2005 20:06:08 -0500

Hello,
I have several matrices, each one represents the solutions to a system of PDE's at several timesteps. I currently get each one by a call to a fortran subroutine that integrates the PDE from time t_{n} to time t_{n+1}. I would like to be able to "concatonate" these matrices into a NDArray (or similar) structure to then pass out of the C++ gateway routine I have written that interfaces with the fortran code but I cannot seem to be able to figure out how to do this. What I need is something like:

NDArray uAll;
for( int i=1; i<=nTimesteps; i++){
 Matrix uOneStep( numberOfPDEs, numberOfGridPts );
 double* uOneStepP = uOneStep.fortran_vec();
 F77_FUNC(pdecode,PDECODE)(uOneStepP,... other args...)
 uAll.insert( uOneStep )
}
return uAll;

Thus uAll would have its "page" dimension each timeslice. This may not be the best way to do this. Any "other" method to get this multidemisional information out would be helpful too.

TIA,

Wax

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]