| Heinrich Acker 2007-06-20, 8:14 am |
| Leo,
if you have trouble implementing something that you got as an answer
to your posting, it's definitely better to continue the thread
instead of staring a new one. That way, other people can see what's
been done to solve the problem. Also, the guy who spend some time to
help you does not feel ignored.
The reply I gave you to your posting "Matlab and Python" a few days
ago should work if you fill in the proper path information; if it
does not work for you, you should describe what you get on the basis
of the previous answer. It is very rare that *nothing* happens! As
you see below, the system command is supposed to return a value. That
value should 'happen', even if the command you issue has no effect.
If you have, for instance, the file 'hello.py' in your Python home
directory 'C:\Python25', with the content:
print "Hello world!"
and you type
system('C:\Python25\hello.py')
into your Matlab command window, you should see:
[color=darkred]
Hello world!
ans =
0
This assumes Windows, and the extension '.py' must be registered,
such that the OS knows it must start the python interpreter to run a
python script. If not, this should work:
system('C:\Python25\python C:\Python25\hello.py')
Regards,
Heinrich
|