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
opfalse = false;
[status, errormessage] = exporttopython(opfalse,'opfalse')
status = 1
errormessage =
opint = 999;
[status, errormessage]=exporttopython(opint,'opint')
status = 1
errormessage =
opfloat = 999.999;
[status, errormessage] = exporttopython(opfloat,'opfloat')
status = 1
errormessage =
opcomp= 99+99i;
[status, errormessage]=exporttopython(opcomp,'opcomp')
status = 1
errormessage =
postring='String Data';
[status, errormessage]=exporttopython(postring,'opstring')
status = 1
errormessage =
opcell = {'aa','bb','cc','dd'};
[status, errormessage] = exporttopython(opcell,'opcell')
status = 1
errormessage =
opstruct = struct('key1',123, 'key2','test');
[status, errormessage]=exporttopython(opstruct,'opstruct')
status = 1
errormessage =
opmatrix = [1 2 -3;4 5 6;-7 8 0];
[status, errormessage ]= exporttopython(opmatrix,'opmatrix')
status = 1
errormessage =
opndmatrix = [1,2,3;4,5,6];
opndmatrix(:,:,2) = [7,8,9;10,11,12];
[status, errormessage ] = exporttopython(opndmatrix,'opndmartix')
status = 1
errormessage =
row = [1, 2, 4, 4, 1, 5, 2, 3, 4, 1, 2, 3, 4, 1, 4];
col = [1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6];
vals = [10, 20, 40, -90, 110, 150, 170, 180, 190, 210, -220, 230, 240, 260, 290];
s = sparse(row, col, vals);
[status, errormessage ] = exporttopython(s,'s')
status = 1
errormessage =