Why do I receive an "Invalid User of Operator Error" when calling function from command line?
Show older comments
I have a code in matlab titled "original_boresight_verification.m" located in a directory "C:\Users\17037\Documents\Code\Matlab\resepi_boresighting". It inputs a file location (as a string), and outputs a single line of numbers (separated by commas) to the command window. It does not return any values.
I need to run this code from a python script and am using the subprocess command, which I have tested (that part "should" be working). When I run this in the command window:

I receive an "Invalid Use of Operator" error. I do not know why. When running the code in the Matlab command window:

I receive no errors, works perfectly fine. If it would help I can upload the code, although it is fairly lengthy so I will not unless it would be helpful.
My question: Why am I receiving an error in the python script calling the matlab function when the matlab function works perfectly fine?
Any help would be greatly appreciated. Thank you :)
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!