Chemist_MZ 发表于 2013-7-4 10:57 
You set both of the upper bound the lower bound to zero, so this is the problem.
The lower bound  ...

我是根据里面做了变换以后的边界条件编的,就是V(x,0)=max(exp(x)-K,0)和下面的    lim V(x,t)=exp(x)    ,        lim  V (x,t)=0                                                           x趋向正无穷                                x趋向负无穷
我把边界条件改成了
ju(N+1,:)=exp(X);
for j=0:M
ju(1,j+1)=0;
end
xx=linspace(0,X,N+1);
for i=1:N+1
ju(i,:)=max(exp(xx(i))-K,0);
end
ju2=ju;
ju3=ju;
还是不行啊。。