https://github.com/ruqihuang/AdjointFmaps
Tip revision: d41efaa1636fb8cc0da8f09d89f4a1cae0172320 authored by ruqihuang on 24 August 2017, 07:39:27 UTC
Update readme
Update readme
Tip revision: d41efaa
boundProject.m
function [x] = boundProject(x,LB,UB)
% function [x] = boundProject(x,LB,UB)
% Computes projection of x onto constraints LB <= x <= UB
x(x < LB) = LB(x < LB);
if nargin > 2
x(x > UB) = UB(x > UB);
end