PDA

查看完整版本 : [MATLAB基础] matlab中如何实现连乘


heartrain1987
2010-11-06, 14:03
例如使用牛顿插值20次多项式,其中
Π(x-xi)
如何实现?
(不希望使用for循环,matlab中是否有自带函数)

zsy312
2010-11-06, 22:46
当然是prod函数了:
PROD Product of elements.
For vectors, PROD(X) is the product of the elements of X. For
matrices, PROD(X) is a row vector with the product over each
column. For N-D arrays, PROD(X) operates on the first
non-singleton dimension.