Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to define a variable as a short integer or other type in MATLAB?
How to define a variable as a short integer or other type in MATLAB?
Pictures are a detailed introduction of data types, which can be referred to. For data:

For example, if you want C to be int8, you can do the following:

c = 0;

C = int 8(C);

For matrices, if you want the int8 type, it looks like this:

C = zero (500,500);

C = int 8(C);

That is, first assign the variable to 0, 1 or a certain value. Then type conversion is forced.

Or c? =? Zero (500,500,' int 8');

Perhaps, you have solved it yourself (see time 2008), and it is ok to give it to others.