I decided to investigate the speed issue a bit more. It seems that
solution of system of linear equations is not the main problem (the
Octave uses a native math library for this task) but the other code is
(there is some plotting which seems to be very slow). I have obtained
similar numbers on my Intel machine at work.
And I noticed that it does not work on my Raspberry Pi model B. The
Octave fails with "illegal instruction" message. It start, prints some
outputs and then if fails. I didn't have more time to investigate this.