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

📄 plane.m

📁 matlab 多参数积分工具箱 multivariable calculus toolbox
💻 M
字号:
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);

⌨️ 快捷键说明

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