Scripting Guide > Data Structures > Matrices > Build Your Own Matrix Functions
发布日期: 11/15/2021

Build Your Own Matrix Functions

You can store your own operations in macros. See Maximize and Minimize. Similarly, you can create custom matrix functions. For example, you can make your own matrix operation called Mag() to find the magnitude of a vector:

mag = Function( {x},
	Sqrt( x` * x )
);

Similarly, you could create a function called Normalize to divide a vector by its magnitude:

normalize = Function( {x},
	x / Sqrt( x` * x )
);
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).