File:Gradient ascent (contour).png

頁面內容唔支援其他語言。
出自維基百科,自由嘅百科全書

原本檔案(730 × 726 像素,檔案大細:38 KB ,MIME類型:image/png

摘要

描述
English: The 'gradient ascent' method applied to a 2D function. This image shows the contour-line point of view. See also: image:gradient ascent (surface).png.
來源 Created with Maple 10, using the code below:
作者 user:Joris Gillis
Other versions
This math image could be recreated using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is already available, please upload it. After uploading an SVG, replace this template with {{vector version available|new image name.svg}}.
> 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.


This graph image could be recreated using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is already available, please upload it. After uploading an SVG, replace this template with {{vector version available|new image name.svg}}.

協議

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

圖中顯示嘅係

檔案歷史

撳個日期/時間去睇響嗰個時間出現過嘅檔案。

日期/時間縮圖尺寸用戶註解
現時2006年1月18號 (三) 20:57響2006年1月18號 (三) 20:57嘅縮圖版本730 × 726(38 KB)Joris Gillis~commonswikiThe 'gradient ascent' method applied to a 2D function. This image shows the contour-line point of view. See also: image:gradient ascent (surface).png. Created with Maple 10, using the following code: <code><pre> > restart:with(VectorCalculus):with(

以下嘅1版用到呢個檔:

全域檔案使用情況

下面嘅維基都用緊呢個檔案: