GetString
Transfer Matlab character array to Origin string.
string GetString( LPCSTR lpcszStringName, LPCSTR lpcszMatLabWorkspace = NULL )
Returns Matlab's character array as a string.
EX1
#include <externApps.h> // this file is not included in origin.h void Matlab_GetString_ex1() { Matlab matObj(TRUE); if(!matObj) { out_str("No Matlab found"); return; } // Matlab object successfully created, i.e. communication established if (matObj.PutString( "mcharname", "OC::Matlab Origin Text", "base" )) { string strMcharname; strMcharname = matObj.GetString( "mcharname", "base" ); out_str(strMcharname); } }
Matlab::PutString
ExternApps.h