23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Overview of <strong>MATLAB</strong> Data Types<br />

Overview of <strong>MATLAB</strong> Data Types<br />

There are 15 fundamental data types in <strong>MATLAB</strong>. Each of these data types is<br />

in the form of a matrix or array. This matrix or array is a minimum of 0-by-0<br />

in size and can grow to an n-dimensional array of any size.<br />

All of the fundamental data types are shown in lowercase, plain nonitalic text<br />

in the diagram below.<br />

The two data types shown in italic text are user-defined, object-oriented<br />

user classes and Java classes. Youcanusethelatterwiththe<strong>MATLAB</strong><br />

interfacetoJava(see“CallingJavafrom<strong>MATLAB</strong>”inthe<strong>MATLAB</strong>External<br />

Interfaces documentation).<br />

You can create two-dimensional double and logical matrices using one of<br />

two storage formats: full or sparse. For matrices with mostly zero-valued<br />

elements, a sparse matrix requires a fraction of the storage space required<br />

for an equivalent full matrix. Sparse matrices invoke methods especially<br />

tailored to solve sparse problems<br />

These data types require different amounts of storage, the smallest being a<br />

logical value or 8–bit integer which requires only 1 byte. It is important to<br />

keep this minimum size in mind if you work on data in files that were written<br />

using a precision smaller than 8 bits.<br />

2-3

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

Saved successfully!

Ooh no, something went wrong!