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

📄 minval.m

📁 压缩包里包含了无约束优化问题常用的几种求解方法的源程序:变量轮换法(variable_rotation.m)、最速下降法(steepest_descent.m)、修正牛顿法(modified_newt
💻 M
字号:
function min=minval(str,solvec)
%  File name:minval.m      
%  Author:Yan Anxin
%  ID number:081810
%  Date:finished on 2008.11.18
%  Description:  
%       Here defines a function,to get the value of the given function and the given point    
%       In the syntax min=minval(str,solvec),
%       str----input,means the expression of given function
%       solvec----input,means the given point
%       min=minval(str,solvec) returns min, i.e. the the value of the given function and the given point       

f=str;
n=length(solvec);            %gets the number of variables
for p=1:n
    s=sym(['x' num2str(p)]);
    f=subs(f,s,solvec(p));
    min=f;
end

⌨️ 快捷键说明

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