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!