I'm trying to execute some Matlab
scripts (not a function definition) from Python 3
using oct2py
module.
Those scripts (a large amount) contains a very extended definition to read a specific ASCIII files (contained in the same directory).
I do not know how to get the data read by Python with the Matlab (octave) scripts.
Here what I am doing:
from oct2py import octave
import numpy as np
import os
import pprint
hom_dir='/path_to/files&scripts_dir/'
os.chdir(hom_dir)
octave.addpath(/path_to/files&scripts_dir/')
out=octave. matlab_file # (matlab_file.m)
output:
Out[237]: <function oct2py.core.Oct2Py._make_octave_command.<locals>.octave_command>”
pprint.pprint(out)
<function Oct2Py._make_octave_command.<locals>.octave_command at 0x7f2069d669d8>”
No error is returned, but I do not know how to get the data (that were read in a Octave session). The examples that I have found for execute .m files using oct2py
where about files that define functions, however that is not my case.