Running a pvpython function in MATLAB
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!