|
|
| File Information |
| Description |
This class implements a very simple but efficient way to temporarily store data.
This tool was created to store simulation data of a switching control system that is returned by the ode functions.
This class is NOT intended to store large numbers of small data chunks, for example single vectors. This class is intended to store an unknown number of matrices that match in one dimension. On read-out, the stored object are concatenated in one direction.
To store a large number of small data elements, preallocate memory by creating a matrix to hold several data elements. Store this matrix in the buffer class when filled and create a new one. Adaption of the size of the temporary
variable, for example doubling of the size with an upper bound, is a compromise between memory overhead and execution time.
It was kindly expressed by John D'Errico, that his tool (file-id 8334) solves a similar task.
methods of class buffer:
constructor - creates empty buffer
store - stores a matrix in the buffer
flush - reads out the buffer concatenating the elements in rows (default) or columns.
example:
buf = buffer
buf = store(buf,eye(3))
buf = store(buf,eye(3))
flush(buf)
flush(buf,1) |
| MATLAB release |
MATLAB 7.2 (R2006a)
|
| Zip File Content |
|
| Other Files |
@buffer/display.m, @buffer/buffer.m, @buffer/flush.m, @buffer/store.m
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 26 Feb 2007 |
John D'Errico
|
|
|
| 28 Feb 2007 |
Jan Wolff
|
|
|
| Updates |
| 01 Mar 2007 |
added help as requested.
reset method removed. |
| 07 May 2007 |
A typo in the example code is corrected. |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com