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.

Accessing Files with Memory-Mapping<br />

MethodsofthememmapfileClass<br />

You can use the following methods on objects constructed from the memmapfile<br />

class.<br />

Syntax<br />

disp<br />

get(obj)<br />

get(obj, property)<br />

Description<br />

Displays properties of the object. The display does<br />

not include the object’s name.<br />

Returns the values of all properties of the<br />

memmapfile object in a structure array.<br />

Returns the value of the specified property.<br />

property can be a string or cell array of strings,<br />

each containing a property name.<br />

Using the disp Method<br />

Use the disp method to display all properties of a memmapfile object. The<br />

text displayed includes only the property value, and not the object name or<br />

the<strong>MATLAB</strong>responsestring,ans =.<br />

Construct object m:<br />

m = memmapfile('records.dat', ...<br />

'Offset', 2048, ...<br />

'Format', { ...<br />

'int16' [2 2] 'model'; ...<br />

'uint32' [1 1] 'serialno'; ...<br />

'single' [1 3] 'expenses'});<br />

and display all of its properties:<br />

disp(m)<br />

Filename: 'd:\matlab\mfiles\records.dat'<br />

Writable: false<br />

Offset: 2048<br />

Format: {'int16' [2 2] 'model'<br />

'uint32' [1 1] 'serialno'<br />

'single' [1 3] 'expenses'}<br />

Repeat: Inf<br />

6-67

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

Saved successfully!

Ooh no, something went wrong!