I feel like i am almost there but need the extra push! I am trying to call a MATLAB script from Python (I'm not worried about the output of the MATLAB script - it runs independently). However, i must be able to send an input into the MATLAB script from python.
Right now I have(in python):
myvartoinput = 55
cmd = 'myscript.m'
process = Popen(["matlab", "-nosplash", "-nodesktop", "-r", cmd], shell=True)
process.communicate()
# Also, how do i 'exit' the MATLAB so it doesn't continue to run
I am not sure how to add "myvartoinput" into the 'myscript.m' file. Also, did I call the script correctly? Finally, i would like it to "exit" so it doesn't stay open in the background on my pc. Any help would be appreciated!