pvPacks#
Purpose#
Packs symmetric matrix into a structure of type PV
.
Format#
- p1 = pvPacks(p1, x, nm)#
- Parameters:
p1 (struct) – an instance of structure of type
PV
x (MxM symmetric matrix) – data
nm (string) – matrix name.
- Returns:
p1 (struct) – instance of
PV
struct.
Examples#
struct PV p1;
p1 = pvCreate;
x = { 1 2,
2 1 };
p1 = pvPacks(p1, x, "A");
p1 = pvPacks(p1, eye(2), "I");
These matrices can be extracted using the pvUnpack()
command:
print pvUnpack(p1, "A");
1.000 2.000
2.000 1.000
print pvUnpack(p1, "I");
1.000 0.000
0.000 1.000
Remarks#
pvPacks()
does not support the packing of arrays.
Source#
pv.src
See also
Functions pvPacksm()
, pvUnpack()