From: John Densmore on
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
"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