|
From: | David Bateman |
Subject: | Re: load/save and C++ |
Date: | Wed, 16 Aug 2006 22:17:02 +0200 |
User-agent: | Thunderbird 1.5 (Windows/20051201) |
Marek Szczypinski wrote:
Hello All,Is it possible to load/save .mat file from c++, in a standalone application, not a .oct function file? Any advice appreciated.Thanks in advance, Marek
Well, as the octave load/save code assumes that the variables are loaded into octave_value's this basically means that you have to link to liboctinterp.so as well as liboctave.so. Then you can probably call the load_save.cc (do_load) function in a manner similar to that around the lines 879-948... This will load the variables to the user space, which might not be what you want. Alternatively you might use a modified version of the do_load that instead of calling "install_loaded_variable", instead extracts the variable from the octave_value and places it in an appropriate type. You might want to simplify do_load for your needs
Cheers David
[Prev in Thread] | Current Thread | [Next in Thread] |