https://github.com/ruqihuang/AdjointFmaps
Raw File
Tip revision: d41efaa1636fb8cc0da8f09d89f4a1cae0172320 authored by ruqihuang on 24 August 2017, 07:39:27 UTC
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
back to top