File:Gradient ascent (surface).png

原始文件(760 × 624像素,文件大小:122 KB,MIME类型:image/png


摘要

The 'gradient ascent' method applied to a function. This image shows the surface of the function (3D interpretation). See also: image:gradient ascent (contour).png.

Created with Maple 10, using the following code:

> restart:with(VectorCalculus):with(plots):with(plottools):
> z:=(x,y)->sin(1/2*x^2-1/4*y^2+3)*cos(2*x+1-exp(y)):
> grad:=VectorCalculus[Gradient](z(x,y),[x,y]);
> plot3d(z(x,y),x=-1.2..1.2,y=-1.2..1.2,axes=normal,numpoints=1000);p3d:=%:
> contourplot(z(x,y),x=-1.2..1.2,y=-1.2..1.2,axes=normal,contours=30,numpoints=3000);cont:=%:
> start:=[-1/4,1/3];ptf[0]:=Vector(start):
> steps:=15;
> for i from 0 to steps do:
  print(ptf[i]):
  pt[i]:=Vector([convert(ptf[i],list)[],z(ptf[i][1],ptf[i][2])]):
  dir[i]:=evalf(Normalize(evalVF(grad,ptf[i])));
  par[i]:=ptf[i]+lambda*dir[i];
  lambd[i]:=fsolve(diff(z(par[i][1],par[i][2]),lambda)=0,lambda=0);
  ptf[i+1]:=eval(par[i],lambda=lambd[i]);
  od:i:='i':
> display(cont,'point(convert(ptf[i],list),color=blue)'$'i'=0..steps,'plot([par[i][1],par[i][2],lambda=0..lambd[i]])'$'i'=0..steps);
> display(p3d,'point(convert(pt[i],list),color=blue,symbol=circle,symbolsize=4)'$'i'=0..steps,'spacecurve([par[i][1],par[i][2],z(par[i][1],par[i][2])],lambda=0

Made a screenshot, cropped with paint shop pro 4.12, saved with Irfanview


此graph图片可使用矢量图形重新创建为SVG文件。这具有很多好处;更多信息请参见共享资源:待清理媒体。如果存在此图片的SVG格式,请将其上传,然后将此模板替换为{{vector version available|新图片名称}}


建议您将SVG命名为“Gradient ascent (surface).svg”,这样在使用Vector version available(或Vva)模板时就不需要填写新图片名称参数。

许可协议

Public domain 我,本作品著作权人,释出本作品至公有领域。这适用于全世界。
在一些国家这可能不合法;如果是这样的话,那么:
我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2006年1月18日 (三) 21:002006年1月18日 (三) 21:00版本的缩略图760 × 624(122 KB)Joris Gillis~commonswikiThe 'gradient ascent' method applied to a function. This image shows the surface of the function (3D interpretation). See also: image:gradient ascent (contour).png. Created with Maple 10, using the following code: <code><pre> > restart:with(VectorC

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: