⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lse.m

📁 HERE IS A GOOD PSO TOOL BOX
💻 M
字号:
function [f,expyy] = lse(E,y)% % LSE finds log-sum-exp values.%% It calculates log(E*exp(y)), with special handling of extreme y values.% % ymax is a vector of maximum exponent values of each posynomial.%% ex: log(exp(y1)+exp(y2)+exp(y3)), log(exp(y4)+exp(y5))%     ymax = [max(y1,y2,y3); max(y4,y5)]%% note: min(y) are substracted and added to handle the case when all the%       exponents of a posynomial are negative.%       i.e., 0 0 0 -3 -4 -> max value should be -3ymax  = full(max(E*sparse(1:length(y),1:length(y),y-min(y)),[],2))+min(y);expyy = exp(y-E'*ymax);f     = log(E*expyy)+ymax;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -