28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2int8, int16, int32, int64<br />

Purpose Convert to signed integer<br />

Syntax I = int8(X)<br />

I = int16(X)<br />

I = int32(X)<br />

I = int64(X)<br />

int8, int16, int32, int64<br />

Description I = int*(X) converts the elements of array X into signed integers. X can be any<br />

numeric object (such as a double). The results of an int* operation are shown<br />

in the next table.<br />

Operation Output Range Output Type Bytes per<br />

Element<br />

int8 -128 to 127 Signed 8-bit<br />

integer<br />

int16 -32,768 to 32,767 Signed 16-bit<br />

integer<br />

int32 -2,147,483,648 to 2,147,483,647 Signed 32-bit<br />

integer<br />

int64 -9,223,372,036,854,775,808 to<br />

9,223,372,036,854,775,807<br />

double and single values are rounded to the nearest int* value on conversion.<br />

A value of X that is above or below the range for an integer class is mapped to<br />

one of the endpoints of the range. For example,<br />

int16(40000)<br />

ans =<br />

32767<br />

Signed 64-bit<br />

integer<br />

1 int8<br />

2 int16<br />

4 int32<br />

8 int64<br />

Output Class<br />

If X is already a signed integer of the same class, then int* has no effect.<br />

You can define or overload your own methods for int* (as you can for any<br />

object) by placing the appropriately named method in an @int* directory<br />

within a directory on your path. Type help datatypes for the names of the<br />

methods you can overload.<br />

2-1187

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!