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: Sprintf and Matrix
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jerome

Posts: 48
Registered: 12/9/11
Sprintf and Matrix
Posted: Dec 4, 2012 10:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am trying to pass my matrix variable from MATLAB to python. Is there a way to do it without using for loops? In the example, the first element is passed but not corresponding values

For example
A = magic(5);
[str,err] = sprintf('/usr/local/python name_of_program.py %d', A);
unix(str)



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.