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

📄 lorentz.m

📁 it is a source code from mathworks
💻 M
字号:
function p = lorentz(x,y)
% LORENTZ  Calculates the Lorentz inner product
%          of the two 4 by 1 vectors x and y

% Written by Kai Borre
% April 22, 1995

%  M = diag([1 1 1 -1]);
%  p = x'*M*y;

   p = x(1)*y(1) + x(2)*y(2) + x(3)*y(3) - x(4)*y(4);

%%%%%%%%%% end lorentz.m %%%%%%%%%%%%%%%

⌨️ 快捷键说明

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