2.2.2.1.10 Matlab::PutString

Description

Transfer Origin string to Matlab character array.

Syntax

BOOL PutString( LPCSTR lpcszStringName, LPCSTR lpcszString, LPCSTR lpcszMatLabWorkspace = NULL )

Parameters

lpcszStringName
The name of the Matlab character array source
lpcszString
lpcszMatLabWorkspace
default value "base" defines lpcszMatrixName in default Matlab workspace. The use of "global" for global Matlab workspace is not currently supported

Return

Returns TRUE on successful exit and FALSE on error.

Examples

EX1

#include <externApps.h> // this file is not included in origin.h
void Matlab_PutString_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);
   }
}

Remark

See Also

Matlab::GetString

Header to Include

ExternApps.h