Documentation Center    • Trial Software   • Product Updates
Creating New Kinds of System Objects for File Input and Output
This example shows how to create and use two System objects,
dsp.examples.FileReader and dsp.examples.FileWriter. These
System objects implement basic file reading and writing by using
the MATLAB functions FREAD and FWRITE.   In this example, you
create two new kinds of System objects, a file reader and a file
writer, and you stream characters from one to the other.
Creation of the Classes  System objects are MATLAB classes that
derive from matlab.System, and implement several methods of that
class. In this example, we will use a simple file reader
(dsp.examples.FileReaderdsp.examples.FileReader) and a file
writer (dsp.examples.FileWriterdsp.examples.FileWriter). The
FileWriter System object consists of four sections:  1. A public
property Filename, which is nontunable (it cannot be changed
after the first call to step):    properties (Nontunable)
Filename = ''  2. A private prope