single
Marks the given input in as a single precision data type. Single precision data can be used in the save command to write with single precision in .mat files.
Syntax
single(in)
Inputs
- in
- Type: scalar | complex | matrix
Example
Mark a 2D Matrix as single precision data
m = eye(5);
single(m);
save('test.mat'); % This will save m with single precision in the mat file