Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: A strange problem using SYSTEM function
Replies: 2   Last Post: Sep 14, 2013 12:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jianming Zhang

Posts: 4
Registered: 9/14/13
A strange problem using SYSTEM function
Posted: Sep 14, 2013 12:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I encountered a very strange problem when using the SYSTEM function to call an executable file from Matlab.

First, I can run the executable file in a window console with no problem. However, when I call system(foo.exe) in Matlab, it does nothing but return the status value -1.0737e+09, and it does not throw any warnings or errors.

I am using Matlab R2009b on a 32-bit windows system and the executable file depends on OpenCV2.40.

The system path variable definitely include all the required lib directories. I also tried adding the relevant paths in the LD_LIBRARY_PATH, and copying the dlls in the working directory. These attempts do not change anything.

I also tried calling SYSTEM('cmd') from Matlab, and running the executable in the invoked window console. It gave me no response, either. It seems like the running environment of the console called from Matlab is different from the original window console.

Running the same code on a different machine in Matlab is successful.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.