Menu

#259 add MATLAB typecast function

v4.1 (minor)
open
nobody
5
2014-02-18
2014-02-18
Gabriel
No

THANKS/GREAT JOB!
Hi, first of all, I just started using FreeMat and I LOVE IT! Great job; keep up the great work! Far superior and more useful to me than Octave (impossible install) and Scilab (not a MATLAB clone), and I really hope you keep going with this.

NOW ONTO WHAT:
Now, on to my problem: I need the MATLAB typecast function please.

WHY?:
This allows very efficient data management, as I am currently reading data from an Arduino straight into FreeMat, via serial, and processing/logging it live, and I really need to be able to do low-level data conversions in order to maximize serial data transfer speeds. This means that I need to convert a 4-byte float into a 4-byte array, and back again, for instance. Please see the attached file. I have been so desperate to make this work that I put many hrs. into finding a work-around, as you will see attached. My work-around uses fread and fwrite, and uses a temporary workspace file as a conversion tool.

WHAT ELSE?
I'd also love native serial communication abilities in FreeMat. I am currently using Jon Weaver's library, which works, but is slow (it runs at 1/5 the speed of what serial should perform, as I have it implemented):
-https://groups.google.com/forum/#!topic/freemat/z7LHMCPOx8w
-direct download: http://www.google.com/url?q=http%3A%2F%2Fjonw0224.tripod.com%2FSerialDll.zip&sa=D&sntz=1&usg=AFQjCNEaHNlq9_ZUA5YvtX3D1OcNNWXFUQ

1 Attachments

Discussion


Log in to post a comment.