Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-29 Thread Michael Torrie
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.E

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-29 Thread Bob van der Poel
You might have better mileage using the python path routines to create the path/file names. Set the path the routines documented in os.path(). On Wed, Mar 28, 2018 at 10:24 PM, Rishika Sen wrote: > error persists h.Execute ("run('H:\\rishika\\MATLAB\\filewrite.m')") > '??? Error using run (l

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-28 Thread Rishika Sen
error persists >>> h.Execute ("run('H:\\rishika\\MATLAB\\filewrite.m')") '??? Error using run (line 41)\nH:\\rishika\\MATLAB\\filewrite.m not found.\n\n' >>> h.Execute ("run(r'H:\rishika\MATLAB\filewrite.m')") '??? Error: Unexpected MATLAB expression.\n\n -- https://mail.python.org/mailman/listinf

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-28 Thread Rishika Sen
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' >>> h.Execute ("run(r'H:\rishika\MATLAB\filewrite.m')") '??? Error: Unexpected MATLAB expression.\n\n -- htt

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-28 Thread Paul Moore
On 28 March 2018 at 10:23, wrote: > So I am using the following code to call a Matlab(2016a) function from > python(3.6). > >>>import win32com.client >>>h = win32com.client.Dispatch('matlab.application') >>>h.Execute ("plot([0 18], [7 23])") > > When I am using the 'Execute' statement to run a m

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-28 Thread rishika21sen
I am using WinPython 3.6 -- https://mail.python.org/mailman/listinfo/python-list