Prev: Print figures with a patch object into a searchable pdf file
Next: finding max/min correlation of a given number of data points contained in two sets of data
From: John Densmore on 11 Mar 2010 13:38 Hi all, I have a python class that reads a binary file and spits out some data. Is there anyway I can call that python class from with in a matlab script? I don't want to rewrite my code that reads the binary file in matlab. Thanks
From: Wayne King on 11 Mar 2010 15:30
"John Densmore" <jrmrdrernsmore.remove4rs(a)gmail.com> wrote in message <hnbdat$55l$1(a)fred.mathworks.com>... > Hi all, > I have a python class that reads a binary file and spits out some data. Is there anyway I can call that python class from with in a matlab script? I don't want to rewrite my code that reads the binary file in matlab. Thanks Hi John, is the format of the file straightforward? Why can't you read it directly into MATLAB? Are you just using open() in Python with a 'b' argument, because that it is easy to do in MATLAB with fopen() If it's really involved to read the binary data (much more complicated than just using open() ) , then how about writing it to a simple binary file, or ASCII file after you import it with Python. Then you can read it into MATLAB simply. Wayne |