exporttopython
Exports the OML variable value to the Python variable.
Syntax
[status,errorMessage]=exporttopython(omlVariableName, PythonVariableName)
Inputs
- PythonVariableName
- Python variable name.
Outputs
- omlVariableName
- OML variable.
Examples
Exporting logical data to Python:
opfalse = false;
[status, errormessage] = exporttopython(opfalse,'opfalse')
status = 1
errormessage =
Exporting integer data to Python:
opint = 999;
[status, errormessage]=exporttopython(opint,'opint')
status = 1
errormessage =
Exporting precision data to Python:
opfloat = 999.999;
[status, errormessage] = exporttopython(opfloat,'opfloat')
status = 1
errormessage =
Exporting complex data to Python:
opcomp= 99+99i;
[status, errormessage]=exporttopython(opcomp,'opcomp')
status = 1
errormessage =
Exporting string data to Python:
postring='String Data';
[status, errormessage]=exporttopython(postring,'opstring')
status = 1
errormessage =
Exporting cell data to Python:
opcell = {'aa','bb','cc','dd'};
[status, errormessage] = exporttopython(opcell,'opcell')
status = 1
errormessage =
Exporting struct data to Python:
opstruct = struct('key1',123, 'key2','test');
[status, errormessage]=exporttopython(opstruct,'opstruct')
status = 1
errormessage =
Exporting matrix data to Python:
opmatrix = [1 2 -3;4 5 6;-7 8 0];
[status, errormessage ]= exporttopython(opmatrix,'opmatrix')
status = 1
errormessage =
Exporting nd matrix data to Python:
opndmatrix = [1,2,3;4,5,6];
opndmatrix(:,:,2) = [7,8,9;10,11,12];
[status, errormessage ] = exporttopython(opndmatrix,'opndmartix')
status = 1
errormessage =