On 03/28/2018 11:24 PM, Rishika Sen wrote: > I tried these options too as suggested by Paul... > >>>> h.Execute ("run('H:\\rishika\\MATLAB\\filewrite.m')") > '??? Error using run (line 41)\nH:\\rishika\\MATLAB\\filewrite.m not > found.\n\n'
Crazy question, but you're sure of that path? >>>> h.Execute ("run(r'H:\rishika\MATLAB\filewrite.m')") > '??? Error: Unexpected MATLAB expression.\n\n Not surprised there. MATLAB doesn't know what to do with the extra r you put in there. The r expression should be added to the python string, not the bit inside. h.Execute(r"run('H:\rishika\MATLAB\filewrite.m')") ^^^^ You might also try using forwards slashes for folder delimiters. All windows APIs can deal with them. h.Execute("run('H:/rishika/MATLAB/filewrite.m')") -- https://mail.python.org/mailman/listinfo/python-list