Skip to content

matlab support #3

@YSanchezAraujo

Description

@YSanchezAraujo

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions