⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vector.dem

📁 支持向量机初学者可以看看,用于可以用于C-SVM分类、?-SVM分类、?-SVM回归和?-SVM回归等问题
💻 DEM
字号:
## This file demonstrates new features in gnuplot 3.6# -1- saving contour lines as a gnuplottable file# -2- plotting a vector field on the same graph# -3- manipulating columns using the '$1,$2' syntax.# the example is taken here from Physics is the display of equipotential# lines and electrostatic field for a dipole (+q,-q)print "\n This file demonstrates new features in gnuplot 3.6"print " -1- saving contour lines as a gnuplottable file"print " -2- plotting a vector field on the same graph"print " -3- manipulating columns using the '$1,$2' syntax."print " the example is taken here from Physics is the display of equipotential"print " lines and electrostatic field for a dipole (+q,-q)"print "\n Please note that this demo runs only on x11 term, because"print " It needs to change term to table and then back to screen,"print " and gnuplot currently has no way of saving current terminal."pause -1 "<CR> to continue"#      r(x,y)=sqrt(x*x+y*y)      v1(x,y)=  q1/(r((x-x0),y))      v2(x,y)=  q2/(r((x+x0),y))#      vtot(x,y)=v1(x,y)+v2(x,y)#      e1x(x,y)= q1*(x-x0)/r(x-x0,y)**3      e1y(x,y)= q1*(y)/r(x-x0,y)**3      e2x(x,y)= q2*(x+x0)/r(x+x0,y)**3      e2y(x,y)= q2*(y)/r(x+x0,y)**3      etotx(x,y)=e1x(x,y)+e2x(x,y)      etoty(x,y)=e1y(x,y)+e2y(x,y)      enorm(x,y)=sqrt(etotx(x,y)*etotx(x,y)+etoty(x,y)*etoty(x,y))      dx1(x,y)=coef*etotx(x,y)/enorm(x,y)      dy1(x,y)=coef*etoty(x,y)/enorm(x,y)      dx2(x,y)=coef*etotx(x,y)      dy2(x,y)=coef*etoty(x,y)#      coef=.7      x0=1.      q1=1      q2=-1      xmin=-10.      xmax=10.      ymin=-10.      ymax=10.#resetset term x11set noautoscaleset xr [xmin:xmax]set yr [ymin:ymax]set isosam 31,31set view 0, 0, 1, 1set nosurfaceset contour baseset cntrparam order 4set cntrparam linearset cntrparam levels discrete -3,-2 ,-1 ,-0.5 ,-0.2 ,-0.1 ,-0.05 ,-0.02 ,0 ,0.02 ,0.05 ,0.1 ,0.2 ,0.5 ,1 ,2 ,3 set cntrparam points 5#set label "-q" at -1,0 centerset label "+q" at  1,0 centersplot vtot(x,y) w lpause -1 "Now create a file with equipotential lines <CR> to continue"set term tableset out "equipo2.dat"repset outset term x11resetplot "equipo2.dat" w lpause 0 "Now create a x/y datafile for plotting with vectors "pause 0"and display vectors parallel to the electrostatic field"pause -1 "<CR> to continue"set isosam 31,31set term tableset out "field2xy.dat"splot vtot(x,y) w lset outset term x11set noautoscaleset xr [xmin:xmax]set yr [ymin:ymax]set isosam 31,31plot "field2xy.dat" u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \"equipo2.dat" w lpause -1 "<CR> to exit"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -