All here described constructors works for all LTPDAobjects.
The following example creates a copy of a LTPDA object (blue command) by an example of the PARFRAC object. The copy constructor should work for all classes.
>> pf1 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], 3)
---- parfrac 1 ----
model: None
res: [1;2+i*1;2-i*1]
poles: [6;1+i*3;1-i*3]
dir: 3
pmul: [1;1;1]
iunits: []
ounits: []
description:
UUID: 7c57ab84-3f49-486b-be49-6ed9926fbd66
-------------------
>> pf2 = parfrac(pf1)
---- parfrac 1 ----
model: None
res: [1;2+i*1;2-i*1]
poles: [6;1+i*3;1-i*3]
dir: 3
pmul: [1;1;1]
iunits: []
ounits: []
description:
UUID: c892f70e-d113-407c-accc-67f988b31e7e
-------------------
REMARK: The following command copies only the handle of an object and doesn't create a copy of the object (as above). This means that everything that happens to the copy or original happens to the other object.
>> pf1 = parfrac()
---- parfrac 1 ----
model: none
res: []
poles: []
dir: 0
pmul: []
iunits: []
ounits: []
description:
UUID: bd7c9c71-e633-402b-964b-0a270f80764a
-------------------
>> pf2 = pf1;
>> pf2.setName('my new name')
---- parfrac 1 ----
model: my new name
res: []
poles: []
dir: 0
pmul: []
iunits: []
ounits: []
description:
UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
-------------------
If we display pf1 again then we see that the property 'name' was changed although we only have changed pf2.
>> pf1
---- parfrac 1 ----
model: my new name
res: []
poles: []
dir: 0
pmul: []
iunits: []
ounits: []
description:
UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
-------------------
The following example creates an empty LTPDA object by an example of a rational object.
>> rat = rational()
---- rational 1 ----
model: none
num: []
den: []
iunits: []
ounits: []
description:
UUID: eb240e62-ff2f-4c31-a683-0f395b9a5242
--------------------
Sometimes it is necessary to create LTPDA objects which have at least one dimension of zero. This mean that the MATLAB method "isempty" is true for these objects. This constructor is shown by an example of a matrix object.
>> m = matrix.initObjectWithSize(1,0)
------ matrix -------
empty-object [1,0]
---------------------
It is also possible with this constructor to create a matrix of objects with a different input as zero.
>> m = matrix.initObjectWithSize(2,1);
---- matrix 1 ----
name: none
size: 0x0
description:
UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
------------------
---- matrix 2 ----
name: none
size: 0x0
description:
UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
------------------
The following example creates a new parfrac object by loading the object from disk.
pf = ao'parfrac_object.mat')
pf = ao'parfrac_object.xml')
Each constructor have different sets of PLISTS which create the object in a different way.
|