File:Non-analytic smooth function.png

Non-analytic_smooth_function.png(376 × 124像素,文件大小:5 KB,MIME类型:image/png


描述 Illustration of an non-analytic smooth function
日期 (UTC)
来源 self-made with MATLAB
作者 Oleg Alexandrov
其他版本

Image:An infinitely differentiable function which is not analytic illustration.png

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

Source code (MATLAB)

% Illustration of an [[:en:Non-analytic smooth function|non-analytic smooth function]]
function main()

   thickness1=2.5; thickness2=1.5; arrowsize=0.15; arrow_type=1; ball_rad=0.03; arrow_angle=35;
   blue = [0, 129, 205]/256; black=[0 0 0]; fontsize=floor(20); dist=0.01;
   
   a=-1; b=5;
   h=0.01;
   X=a:h:b;
   Y=zeros(length(X), 1);
   for i=1:length(X)
      x=X(i);
      if x <= 0
	 Y(i)=0;
      else 
         Y(i)=exp(-1/x);
      end
   end

   
   figure(1);  clf; hold on; axis equal; axis off

   arrow([a 0], [b+0.2, 0], thickness2, arrowsize, arrow_angle, arrow_type, [0, 0, 0])
   arrow([0 -0.3], [0 2.*max(Y)], thickness2, arrowsize, arrow_angle, arrow_type, [0, 0, 0])
   plot(X, Y, 'linewidth', thickness1, 'color', blue);
   plot(X, 0*Y+1, 'linewidth', thickness2/1.5, 'color', black, 'linestyle', '--');
   arrow([b+0.1 0], [b+0.2, 0], thickness2, arrowsize, arrow_angle, arrow_type, [0, 0, 0])
   
   ball(0, 0, ball_rad, blue); place_text_smartly(0, fontsize, 5, dist, '0');
   ball(0, 1, ball_rad, black); place_text_smartly(sqrt(-1), fontsize, 5, dist, '1');

saveas(gcf, 'Non-analytic_smooth_function.eps', 'psc2')

function place_text_smartly (z, fs, pos, d, tx)
 p=cos(pi/4)+sqrt(-1)*sin(pi/4);
 z = z + p^pos * d * fs; 
 shiftx=0.0003;
 shifty=0.002;
 x = real (z); y=imag(z); 
 H=text(x+shiftx*fs, y+shifty*fs, tx); set(H, 'fontsize', fs, 'HorizontalAlignment', 'c', 'VerticalAlignment', 'c')


function ball(x, y, r, color)
   Theta=0:0.1:2*pi;
   X=r*cos(Theta)+x;
   Y=r*sin(Theta)+y;
   H=fill(X, Y, color);
   set(H, 'EdgeColor', color);

function arrow(start, stop, thickness, arrow_size, sharpness, arrow_type, color)
   
% Function arguments:
% start, stop:  start and end coordinates of arrow, vectors of size 2
% thickness:    thickness of arrow stick
% arrow_size:   the size of the two sides of the angle in this picture ->
% sharpness:    angle between the arrow stick and arrow side, in degrees
% arrow_type:   1 for filled arrow, otherwise the arrow will be just two segments
% color:        arrow color, a vector of length three with values in [0, 1]
   
% convert to complex numbers
   i=sqrt(-1);
   start=start(1)+i*start(2); stop=stop(1)+i*stop(2);
   rotate_angle=exp(i*pi*sharpness/180);

% points making up the arrow tip (besides the "stop" point)
   point1 = stop - (arrow_size*rotate_angle)*(stop-start)/abs(stop-start);
   point2 = stop - (arrow_size/rotate_angle)*(stop-start)/abs(stop-start);

   if arrow_type==1 % filled arrow

      % plot the stick, but not till the end, looks bad
      t=0.5*arrow_size*cos(pi*sharpness/180)/abs(stop-start); stop1=t*start+(1-t)*stop;
      plot(real([start, stop1]), imag([start, stop1]), 'LineWidth', thickness, 'Color', color);

      % fill the arrow
      H=fill(real([stop, point1, point2]), imag([stop, point1, point2]), color);
      set(H, 'EdgeColor', 'none')
      
   else % two-segment arrow
      plot(real([start, stop]), imag([start, stop]),   'LineWidth', thickness, 'Color', color); 
      plot(real([stop, point1]), imag([stop, point1]), 'LineWidth', thickness, 'Color', color);
      plot(real([stop, point2]), imag([stop, point2]), 'LineWidth', thickness, 'Color', color);
   end
此math图片可使用矢量图形重新创建为SVG文件。这具有很多好处;更多信息请参见共享资源:待清理媒体。如果存在此图片的SVG格式,请将其上传,然后将此模板替换为{{vector version available|新图片名称}}


建议您将SVG命名为“Non-analytic smooth function.svg”,这样在使用Vector version available(或Vva)模板时就不需要填写新图片名称参数。
此math图片可使用矢量图形重新创建为SVG文件。这具有很多好处;更多信息请参见共享资源:待清理媒体。如果存在此图片的SVG格式,请将其上传,然后将此模板替换为{{vector version available|新图片名称}}


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

说明

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

此文件中描述的项目

描绘内容

文件历史

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

日期/时间缩⁠略⁠图大小用户备注
当前2007年12月3日 (一) 01:022007年12月3日 (一) 01:02版本的缩略图376 × 124(5 KB)Oleg AlexandrovTweak
2007年12月3日 (一) 01:012007年12月3日 (一) 01:01版本的缩略图376 × 119(5 KB)Oleg AlexandrovOoops, the previous function was the wrong one
2007年12月3日 (一) 00:562007年12月3日 (一) 00:56版本的缩略图376 × 138(5 KB)Oleg Alexandrov{{Information |Description=Illustration of an non-analytic smooth function |Source=self-made with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov |Permission=See below |other_versions=[[:Image:An i

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: