exporttopython
Exports the OML variable value to the Python variable.
Syntax
[status,errorMessage]=exporttopython(omlVariable, PythonVariableName)
Inputs
- PythonVariableName
- PythonVariable name.
Outputs
- omlVariable
- OMLVariable.
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_1_n = {'aa','bb','cc','dd'};
[status, errormessage] = exporttopython(opcell_1_n,'opcell_1_n')
opcell_0_n = cell(0,2);
[status, errormessage] = exporttopython(opcell_0_n,'opcell_0_n')
opcell_m_n = {'aa','bb','cc','dd';true,2,{1,2,3},ones(2)};
[status, errormessage] = exporttopython(opcell_m_n,'opcell_m_n')
opcell_m_0 = cell(2,0);
[status, errormessage] = exporttopython(opcell_m_0,'opcell_m_0')
opcell_m_1 = {'aa';'bb';'cc';'dd'};
[status, errormessage] = exporttopython(opcell_m_1,'opcell_m_1')
status = 1
errormessage =
status = 1
errormessage =
status = 1
errormessage =
status = 1
errormessage =
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 =