Construct empty CDATA object
Construct a CDATA object by loading the object from a file
Construct a CDATA object from a parameter list object (PLIST)
Construct a CDATA from a constant data

Construct empty CDATA object

The following example creates a empty cdata object

c1 = cdata()
-------- cdata 01 ------------

  name:  None
  y:  [0x0], double
  x:
------------------------------

Construct a CDATA object by loading the object from a file

The following example creates a new cdata object by loading the cdata object from disk.

c1 = cdata('c1.mat')
c1 = cdata('c1.xml')

Construct a CDATA object from a parameter list object (PLIST)

Creates a data object with the given parameter list which contains 'fcn' or 'vals'

Use the key word 'fcn'

The following example creates a CDATA object from the description of any valid MATLAB function.

pl = plist('fcn', 'randn(100,1)');

c1 = cdata(pl)

Use the key word 'vals'

The following example creates a CDATA object with the values specified in 'vals'. Remark: the cdata object stores the values in the property 'y' so it is also possible to use the key-value 'y'

vals = [0 1 2 3; 5 6 7 8];
pl1  = plist('vals', vals);
pl2  = plist('y',    vals);

c1 = cdata(pl1)
c2 = cdata(pl2)

Construct a CDATA from a constant data

c1 = cdata(1:.1:10)
c2 = cdata([1 2 3; 4 5 6; 7 8 9])

Construct a CDATA object with N samples all of the constant value

vals = 1:10;
N    = 5;

c1 = cdata(N, vals)