JeffEriksen
Bioengineer
- Aug 13, 2007
- 4
I thought Matlab now let you force data types, so that not everything is automatically a double. I am using 7.0 R14. I want to declare variables as type int16 or int32 before reading them in from a binary file. When I do so, however, they still end up as type double. How can I force them to be integer type using only 2 or 4 bytes each? Example:
int16 variable
variable = fread(fid, 1, 'int16')
int16 variable
variable = fread(fid, 1, 'int16')