matlab中的程序the length n of c is odd,the first (n+1)/2 are the

问题描述:

matlab中的程序
the length n of c is odd,the first (n+1)/2 are the coefs,the last (n-1)/2 are the weights
x=-10:0.01:10;
f=erf(x);
g=zeros(1,length(f));
temp=sum(w);
w=[w 1-temp];
1个回答 分类:数学 2014-10-14

问题解答:

我来补答
首先erf是一个求高斯分布的积分函数,sum(w)是一个求和的过程,但是w没有给出具体的数值或者函数过程
再问: erf误差函数吧,函数的变量可以为数组吗
再答: 当然可以
再问: f = @(x,c) x(1).^2+c.*x(2).^2;

c = 1.5;
X = fminsearch(@(x) f(x,c),[0.3;1])
X =

1.0e-04 *

-0.2447

0.3159
结果为三个数吗?为什么? x(1),x(2)分别代表什么
 
 
展开全文阅读
剩余:2000
上一页:第一个解释一下
下一页:例二,求解