Octave笔记 之 数值积分与解方程
Octave是GNU的一个项目,作为最好的Matlab免费替代品之一(另一个是Scilab),我们可以用它做很多事情…
函数积分:
Octave supports three different algorithms for computing the integral of a function f over the interval from a to b. These are
quad
Numerical integration based on Gaussian quadrature.
quadl
Numerical integration using an adaptive Lobatto rule.
trapz
Numerical integration using the trapezodial method.
Sample:
对函数
f(x) = x * sin (1/x) * sqrt (abs (1 – x))
有
function y = f (x)
y = x [...]