forcing variable data type
forcing variable data type
(OP)
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')





RE: forcing variable data type
read carefully the documentation... and try this :
CODE
or
CODE
Jérôme