23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

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.

2<br />

Data Types<br />

There are many different types of data that you can work with in <strong>MATLAB</strong>.<br />

You can build matrices and arrays of floating-point and integer data,<br />

characters and strings, logical true and false states, etc. You can also<br />

develop your own data types using <strong>MATLAB</strong> classes. Two of the <strong>MATLAB</strong><br />

data types, structures and cell arrays, provide a way to store dissimilar types<br />

of data in the same array. This chapter describes each of these data types and<br />

how to use them in your <strong>MATLAB</strong> programming.<br />

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

(p. 2-3)<br />

Numeric Types (p. 2-6)<br />

Logical Types (p. 2-33)<br />

Characters and Strings (p. 2-38)<br />

Dates and Times (p. 2-67)<br />

Structures (p. 2-75)<br />

Briefdescriptionofall<strong>MATLAB</strong><br />

data types<br />

Integer and floating-point data<br />

types, complex numbers, NaN,<br />

infinity, and numeric display format<br />

States of true and false, useof<br />

logicals in conditional statements<br />

and logical indexing, logical/numeric<br />

conversion<br />

Characters, strings, cell arrays of<br />

strings, string comparison, search<br />

and replace, character/numeric<br />

conversion<br />

Date strings, serial date numbers,<br />

date vectors, date type conversion,<br />

output display format<br />

C-like structures with named fields,<br />

dynamic field names, adding and<br />

removing fields

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

Saved successfully!

Ooh no, something went wrong!