Send via SMS

civ3's

Monday, February 27, 2006

 

数值微分.m
function g=dfs(f,x,h,s)
switch s
case 1,
g=(feval(f,x+h)-feval(f,x))/h;
case 2,
g=(feval(f,x+2*h)+feval(f,x)-2*feval(f,x+h))/(h*h);
otherwise,
end


Comments: Post a Comment



<< Home

Archives

December 2005   January 2006   February 2006  

This page is powered by Blogger. Isn't yours?