matlab 多参数积分工具箱 multivariable calculus toolbox

源代码在线查看: plane.m

软件大小: 84 K
上传用户: foreverlovely
关键词: multivariable calculus toolbox matlab
下载地址: 免注册下载 普通下载 VIP

相关代码

				function Pi=plane(o,v1,v2)
				%PLANE  Plane from normal.
				%   Beta version!!!
				
				% Copyright (c) 2001-09-02, B. Rasmus Anthin.
				
				error(nargchk(2,3,nargin))
				o=value(vector(o));v1=value(vector(v1));
				if isempty(o) | any(isnan(o))
				   error('Vector O must be constant.')
				end
				if isempty(v1) | any(isnan(v1))
				   switch nargin
				   case 2, error('Vector N must be constant.')
				   case 3, error('Vector V1 must be constant.')
				   end
				end
				
				x=scalar('x');y=scalar('y');z=scalar('z');
				if nargin==2
				   n=v1;
				else
				   v2=value(vector(v2));
				   if isempty(v2) | any(isnan(v2))
				      error('Vector V2 must be constant.')
				   end
				   n=cross(v1,v2);
				end
				Pi=-(n(1)*(x-o(1))+n(2)*(y-o(2)))/n(3)+o(3);
				Pi=Pi([],[],0);			

相关资源