Last active
September 19, 2018 15:03
-
-
Save THiyama/0cec3d558aa3220e1718cc2dc3e1e1d5 to your computer and use it in GitHub Desktop.
MATLABからPythonコードを実行したい。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\Anaconda3 | |
command = "python C:\test.py 2 3" | |
status = dos(command) | |
%%%%実行結果%%%% | |
% command = | |
% "python C:test.py 2 3" | |
% 和:5 | |
% status = | |
% 0 | |
%%%%実行結果%%%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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