📄 minval.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 + -