Question

I have Octave 3.2-4 on Ubuntu 11.10. This is the officially supported version for Ubuntu. Where it seems that GNU Octave's save function does not support binary data saving in single precision float format in MAT-files. For instance:

octave:119> p_t = single(rand(1,5))
p_t =
   0.038507   0.117961   0.894508   0.788297   0.651727

octave:120> class(p_t)
ans = single

octave:121> save -v6 P_T.mat p_t
octave:122> clear all
octave:123> load -v6 P_T.mat p_t
octave:124> p_t
p_t =
   0.038507   0.117961   0.894508   0.788297   0.651727

octave:125> class(p_t)
ans = double

I have tried searching for a known issue of Octave, but could not find anything... Anyone else noticed this problem?

Was it helpful?

Solution

Upgrade. That has already been fixed.

"officially supported version for Ubuntu"? That means absolutely nothing. And even if you mean "latest version packaged by Ubuntu", it would be false. Anyway:

  • you are using an old Ubuntu version. The latest Ubuntu already has Octave 3.6.2
  • you are using an old Octave version (almost 3 years old. There's been 7 releases of Octave since, including 2 major releases)

So there's 2 things you can do:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top