Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Differential Equations, Integration > diff

diff

差分および離散微分

呼び出し手順

y=diff(x)
y=diff(x [,n [,dim]])

パラメータ

x

ベクトルまたは行列 (実数, 複素数, 疎行列 または多項式)

n

整数,差分の次数

dim

整数または"r","c" および "*"を値とする文字列

y

スカラーまたはベクトル

説明

y=diff(x) は差分関数 y=x(2:$)-x(1:$-1)を計算します.

diff(x,n,dim) は, 次元dim方向のn 次 差分関数です.

diff(x,n,"*") は diff(x(:),n)と等価です.

nのデフォルト値は 1です. dim のデフォルト値は "*"です.

dim='r'dim=1と 等価で, dim='c'dim=2と等価です.

v=(1:8)^3;
diff(v)
diff(v,3)

A=[(1:8)^2
   (1:8)^3
   (1:8)^4];

diff(A,3,2)

//approximate differentiation
step=0.001
t=0:step:10;
y=sin(t);
dy=diff(sin(t))/step; //approximate differentiation of sine function
norm(dy-cos(t(1:$-1)),%inf)

参照

  • derivative — approximate derivatives of a function. This function is obsolete. Please use the numderivative function instead.
  • numdiff — 数値的な傾きの推定
Report an issue
<< dassl Differential Equations, Integration feval >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:18:54 CEST 2014