Piecewise linear quadratic (plq), minimum point
[fmin, xmin] = plq_minPt(plqf)
matrix. A PLQ function.
real number, or infinite. The minimum value of the function plqf.
column vector. A vector of points in the argmin of plqf.
Performs a linear scan of plqf, checking each of its pieces, to determine the set of points at which plqf attains its minimum. fmin may be %inf (if plqf is %inf everywhere) or -%inf (if plqf reaches -%inf somewhere, or in the limit).
The vector xmin will contain all minimizers of plqf, except when plqf is minimized over an interval, in which case xmin will contain only the boundaries of this interval. If plqf is a constant function, then xmin is simply [0]. The vector xmin is always returned in nondecreasing order.
This algorithm runs in O(n log n) time, due to the use of sorting subroutines.
plqf = [-3 0 -0.5 -0.5;-2 0 2 7;0 0 -0.5 2;%inf 0 2 2]; [fmin, xmin] = plq_minPt(plqf), scf(); plq_plotMultiple(%f, %f, plqf); plqf = [-15.495963 0. -0.6666667 -2.2597654; -5.3940994 0.0058845 -0.4842946 -0.8467499; -4.002795 0.100625 0.5377847 1.9098488; -3.8909938 -0.0993827 -1.0633951 -1.2947485; -0.3961698 0.100625 0.4930625 1.7333349; 0.9454451 -0.0993827 0.3345885 1.7019436; 4.1586957 0.100625 -0.0436042 1.8807238; 10.626398 0.0803995 0.1246192 1.5309288; %inf 0. 1.8333333 -7.5478088]; [fmin, xmin] = plq_minPt(plqf), scf(); plq_plotMultiple(%f, %f, plqf); | ![]() | ![]() |
Bryan Gardiner
, University of British Columbia, BC, Canada