is it possible to use matlab to produce tuples in python?

2 views (last 30 days)
i've been using this to write variables into a .py file then opening this file in the main script (the script creates a model in the finite element solver ABAQUS and python is the only language it understands)
GridSpaceX=1;
%Make python file with variables
delete('Var.py');
fid = fopen('Var.py', 'w');
fprintf(fid,'GridSpaceX = %0.12f\n',GridSpaceX);
but for one of the variables I need to create a python tuple and all i have is a matlab matrix. any help would be greatly appreciated. Thanks for your help, Michael p.s. a tuple is an immutable list and the matrix is a 2 by lots matrix that is created by matlab

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!