📄 gradient.m
字号:
function G=gradient(str,x)
% File name:gradient.m
% Author:Yan Anxin
% ID number:081810
% Date:finished on 2008.11.16
% Description:
% Here defines a function,to get the gradient of the given point
% In the syntax G=gradient(str,x),
% str----input,means the expression of given function
% x----input,means the given point
% G=gradient(str,x) returns G, i.e. the gradient of the given point
syms x1 x2
delta=[diff(str,x1);diff(str,x2)];
G=subs(delta,[x1 x2],[x(1) x(2)]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -