This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Scripting Guide > Data Structures > Matrices > Build Your Own Matrix Functions
Publication date: 07/30/2020

Build Your Own Matrix Functions

You can store your own operations in macros. See Macros in the Programming Methods section. 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, as follows:

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

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

normalize = Function( {x},
	x / Sqrt( x` * x )
);
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).