Running a pvpython function in MATLAB
显示 更早的评论
Hi all,
I'm trying to run a ParaView Python function using the "system" command but nothing is working. I can run scripts, but now I'm working with a function and failing to pass arguments to it.
I've been trying many variations of this command
system("'C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\pvpython.exe C:\path\fileName.py arg1 arg2 arg3");
This particular syntax produced this error: The filename, directory name, or volume label syntax is incorrect.
According to this page https://uk.mathworks.com/matlabcentral/answers/58852-running-a-python-script-in-matlab the syntax should be:
system(['C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\pvpython.exe C:\path\fileName.py ', arg1,' ', arg2,' ', arg3]) %Keeping in mind that the args are strings.
but I've been getting 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Any idea how to pass arguments to this function?
Thanks!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!