Eigen equivalent of Matlab rescale command
问题 I'd like to recreate the Matlab rescale command in Eigen https://www.mathworks.com/help/matlab/ref/rescale.html I've tried to translate but not sure about it. My Eigen knowledge is too limited still... auto rescale = [&]( Eigen::MatrixXd mat, Eigen::VectorXd inmin, Eigen::VectorXd inmax, Eigen::VectorXd l, Eigen::VectorXd u ) -> Eigen::MatrixXd { auto val = l.array() + ( ((mat - inmin).array()) / (( ((inmax - inmin).array()) * ((u - l).array()) ).array()) ); return val; }; could this be