# Search for values of index that are not at the global minimum of the
# fitting function and replace them as well as their function and
# derivative values associated with the fine grid value nearest the
# the global minimum.
chcemat <- Quant_13B_problem_chcemat
key <- Quant_13B_problem_key
SfdList <- Quant_13B_problem_parmList$SfdList
index <- Quant_13B_problem_parmList$index
Fval <- Quant_13B_problem_parmList$Fval
DFval <- Quant_13B_problem_parmList$DFval
D2Fval <- Quant_13B_problem_parmList$D2Fval
Result <- index_search(SfdList, chcemat, index, Fval, DFval, D2Fval)
changeindex <- Result$changeindex
print(paste("Number changed =",length(changeindex)))
change <- index[changeindex] - Result$index[changeindex]
Run the code above in your browser using DataLab