diff函数
来源:互联网 发布:淘宝店刷信誉多少钱 编辑:程序博客网 时间:2024/06/05 17:56
diff函数为求导函数,调用格式为diff(f,x,n),其中f为函数,x为求导变量(f中的其他字母视为常量),n为求导次数,缺省情况下为1.
>> syms b n;>> m=n*n-5*n+b*n*n*n;>> diff(m,n,1)
MATLAB中解释为:
>> help diff DIFF Difference and approximate derivative. DIFF(X), for a vector X, is [X(2)-X(1) X(3)-X(2) ... X(n)-X(n-1)]. DIFF(X), for a matrix X, is the matrix of row differences, [X(2:n,:) - X(1:n-1,:)]. DIFF(X), for an N-D array X, is the difference along the first non-singleton dimension of X. DIFF(X,N) is the N-th order difference along the first non-singleton dimension (denote it by DIM). If N >= size(X,DIM), DIFF takes successive differences along the next non-singleton dimension. DIFF(X,N,DIM) is the Nth difference function along dimension DIM. If N >= size(X,DIM), DIFF returns an empty array. Examples: h = .001; x = 0:h:pi; diff(sin(x.^2))/h is an approximation to 2*cos(x.^2).*x diff((1:10).^2) is 3:2:19 If X = [3 7 5 0 9 2] then diff(X,1,1) is [-3 2 -3], diff(X,1,2) is [4 -2 9 -7], diff(X,2,2) is the 2nd order difference along the dimension 2, and diff(X,3,2) is the empty matrix. See also gradient, sum, prod. Overloaded methods: char/diff sym/diff fints/diff iddata/diff Reference page in Help browser doc diff
阅读全文
0 0
- diff函数
- diff函数
- 【matlab函数】diff函数
- diff函数(matlab)
- 文件比较函数diff
- MATLAB中的diff函数
- diff函数(matlab)详解
- numpy diff函数
- pandas常用函数之diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- diff
- Netty 实现简单RPC调用
- jQuery中 (function($){…})(jQuery)方法使用
- Android Studio添加aar
- AI 学习规划
- linux bash数值运算
- diff函数
- Unity 协程的使用简介
- js——“==”等同和“===”恒等的区别
- Service包活的几中方法
- Linux Centos下安装Nodejs
- 阿里云服务器 lnmp搭建有感
- 公司开发者账号申请(2017最新版)
- 如何用互联网思维卖关东煮?
- 你需要知道的一些速度