vec2sca.m

来自「matlab 多参数积分工具箱 multivariable calculus」· M 代码 · 共 14 行

M
14
字号
function S=vec2sca(V,dim)
%VEC2SCA  Convert vector to scalar.
%   S = VEC2SCA(V,DIM) where DIM is one of the numbers 1, 2 and 3.
%   This is the same as S = V.x, S = V.y or S = V.z.
%   Used internally by some vector methods.

% Copyright (c) 2001-04-19, B. Rasmus Anthin

[x y z]=vars(V);
switch(dim)
case 1, S=eval(['V.' x]);
case 2, S=eval(['V.' y]);
case 3, S=eval(['V.' z]);
end

⌨️ 快捷键说明

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