[time-nuts] RPi/ beagle bone-like computer without video

jimlux jimlux at earthlink.net
Sat Dec 3 08:46:57 EST 2016


On 12/3/16 12:27 AM, David J Taylor wrote:
> From: jimlux
>
>> The Raspberry Pi OS includes a free MATLAB licence, as I expect you
>> already know.
>
> yes, but
>
> "Note that you cannot install MATLAB as a standalone application or
> execute MATLAB code locally on a Raspberry Pi. To develop applications
> for the Raspberry Pi to be used in standalone operation, please see the
> Raspberry Pi Support from Simulink®."
>
> and of course, we're not using Simulink
> ====================
>
> There's always a catch, isn't there!  Perhaps this helps?
>
>  https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=153608
>
> "The open source "Octave" package is a Matlab clone and is the Raspbian
> repository. We've run a large base of Matlab code on Linux Octave with
> little or no change. One significant catch is that the version in the
> Raspian repository is 3.x which does not have the graphical IDE enabled
> by default as do the 4.x versions. The later can be built on RPi (512k
> or better versions) by following the procedure in the Octave Wiki.
> (https://www.gnu.org/software/octave/)"
>
> Cheers,
> David


THis is not directly time-nuts-ey, but since we talk a lot about small 
processors that have timers and such, and because people might want to 
run Matlab on that processor, I figure I'll continue.  TVB, let us know 
if we're drifting here.

yes, one could build Octave and run that - I use Octave a LOT, although 
in general, I like Matlab's plotting better than Octave - the default 
choices are better, so I wind up with lots of .m code to make the plots 
look right.

Octave also doesn't have some of the Matlab toolbox stuff, although, as 
described in that forum thread, you can find some of it.

More to the point, the Matlab code I need to run wasn't written by me, 
but by someone else, who's not available to do any of this adaptation to 
Octave.

ALso, this kind of "track down a replacement or reconfigure" takes time, 
which is money - so you have a tradeoff between maybe finding a 
different processor board (which also takes time) that costs a bit more, 
but runs your code unchanged without porting to Octave.

ANother thing I've noticed is that Matlab is a LOT faster than Octave 
for some operations, I've not bothered to figure out exactly what it is 
that makes the difference, but I've got a a bunch of stuff that I'm 
doing where I read in 10 million samples and process them (e.g. radio 
output in a VITA-49 VRT file) and that "read, parse, and store into a 
big array" is an order of magnitude faster on Matlab than on Octave (on 
the same computer).  I'm using the GUI Octave, so maybe its JIT compiler 
isn't as sophisticated as Matlabs - or maybe more of the underlying 
functionality in Octave is in .m files, as opposed to invoking a 
compiled function.


By the way, there apparently IS a way to run non-simulink Matlab code on 
the Pi or BB... for some (TBD) limited subset of Matlab, you can put it 
in a simulink "execute Matlab code" block; compile the Simulink model, 
then squirt it down to the BB or Pi.  Pretty clunky to my mind.. but 
there it is.

"With the MATLAB Function block, you can incorporate MATLAB code into 
your Simulink model."

https://www.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html?s_cid=srchtitle

it doesn't allow plot, disp, figure - but I wouldn't be using those on 
the BB or Pi...

Basically, it will generate C/C++ code, so anything that Matlab can 
compile to C code will work.


More information about the time-nuts mailing list