digital signal processing常用工具箱

源代码在线查看: f_circle.m

软件大小: 656 K
上传用户: WJQ198926
关键词: processing digital signal 工具箱
下载地址: 免注册下载 普通下载 VIP

相关代码

				function f_circle (x,y,dia,color)
				
				%F_CIRCLE: Draw a circle in current plot
				%
				% Usage: f_circle (x,y,dia,color)
				%
				% Inputs: 
				%         x     = x coordinate of circle
				%         y     = y coordinate of circle
				%         dia   = diameter of circle 
				%         color = optional 1 by 3 color array
				%
				% Notes: Used by chapter GUI modules
				
				% Draw circle
				
				n = 100;
				r = dia/2;
				phi = linspace(0,2*pi,n);
				x0 = x + r*cos(phi);
				y0 = y + r*sin(phi);
				if (nargin < 4)
				   plot (x0,y0,'k')
				else
				   plot (x0,y0,'Color',color)
				end
				
							

相关资源