Query or set the internal variable that controls whether Octave will automatically mutate sparse matrices to real matrices to save memory. For example,
s = speye(3); sparse_auto_mutate (false) s (:, 1) = 1; typeinfo (s) sparse matrix sparse_auto_mutate (true) s (1, :) = 1; typeinfo (s) matrix