MATLAB function to minimize an error function with constrained and/or integer parameters. Inspired by fminsearchbnd, this function adds a few different constraint possibilities, including the possibility to limit parameters to integer values.
Jeff Miller (2019). fminsearcharb (https://www.github.com/milleratotago/fminsearcharb), GitHub. Retrieved .
Gao, I suggest you write these two functions using the functions in NumTrans. For example, realstoparms would use:
x = NumTrans.Real2Bounded(lb,ub,y)
and parmstoreals would use its inverse
y = NumTrans.Bounded2Real(lb,ub,x)
(In these statements, x is a value of one of your bounded parameters, and y is a real number that fminsearch might suggest as a value for that parameter.)
How to write the realstoparms and parmstoreals functions for lb≤x≤ub, where lb and ub are vectors of parameter constraints ?
Inspired by: fminsearchbnd, fminsearchcon