full3D.m 292 B

123456789
  1. % full3D.m
  2. % Converts a 3D sparse matrix structure back to a non-sparse matrix.
  3. % Singles are converted back to doubles as well.
  4. function A = full3D(Asparse)
  5. A = zeros(Asparse.x_count,Asparse.y_count,Asparse.z_count,'single');
  6. A(Asparse.non_zero_indices) = single(Asparse.non_zero_values);