FUNCTION REFERENCE
fread
Read binary data from a file.
Read binary data from a file.
Syntax
A = fread(fid)Syntax
A = fread(fid, sizeA)Syntax
A = fread(fid, sizeA, precision)Syntax
[A, count] = fread(fid, sizeA, precision, 0, machinefmt)sizeA is Inf (default), N or [m n]; with [m n] the last column is padded with zeros.
precision is as for fwrite; 'uint8=>char' and '*char' return characters.
All other output is double.
Example
[a, n] = fread(fid, [2 2]) % a = [1 3; 2 255], n = 4Differences from MATLAB: output is double or char only, so '*uint8' and
'uint8=>uint8' return double; a skip value other than 0 is not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.