Skip to content

Instantly share code, notes, and snippets.

@THiyama THiyama/runPython.m
Last active Sep 19, 2018

Embed
What would you like to do?
MATLABからPythonコードを実行したい。
cd C:\Anaconda3
command = "python C:\test.py 2 3"
status = dos(command)
%%%%実行結果%%%%
% command =
% "python C:test.py 2 3"
% 和:5
% status =
% 0
%%%%実行結果%%%%
import sys
args = sys.argv
a = args[1]
b = args[2]
c = int(a) + int(b)
print("和:" + str(c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.