pvGetIndex#
Purpose#
Gets row indices of a matrix in a parameter vector.
Format#
- id = pvGetIndex(p1, nm1)#
- Parameters:
p1 (struct) – an instance of structure of type
PVnm1 (string or scalar) – name or row number of matrix
- Returns:
id (Kx1 vector) – row indices of matrix described by nm1 in parameter vector.
Examples#
// Create and populate a PV structure
struct PV p1;
p1 = pvCreate;
p1 = pvPack(p1, 1|2|3, "beta");
p1 = pvPack(p1, 0.5~0.8, "gamma");
// Get the row indices of "beta" in the parameter vector
id = pvGetIndex(p1, "beta");
print id;
Source#
pv.src