-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
would be nice to have, something like:
def main(res_in):
import subprocess
lab_file = "mlab.m"
with open(lab_file, 'r') as mfile:
mscript = mfile.read()
prefix = "function[prox]=resFunc(res_in)"
suffix = "end"
new_file = prefix + '\n' + mscript + '\n' + suffix + '\n'
with open("resFunc.m", 'w') as mfile:
mfile.write(new_file)
cmd = 'matlab -nojvm -nodisplay -r resFunc({res_in});quit'.format(res_in=res_in)
print(cmd)
subprocess.call(cmd.split())
main(2)