Build Custom Matrices from Mixed Data Types
Understanding Matrix Construction
MoreIotas allows flexible matrix building by accepting multiple input formats: raw numbers, vector iotas, lists of numbers, lists of vectors, and nested lists of numbers. This flexibility means you can assemble matrices from whatever data you already have without tedious conversion.
Step-by-Step Construction
Start by organizing your data into the appropriate structure. If you have individual numbers, group them into lists to form rows. If you're working with vectors, you can often use them directly as rows. Nested lists (lists of lists) naturally map to matrix rows and columns.
Pass your structured data to the matrix construction action. The mod will interpret the format and build the matrix accordingly. Verify the result has the dimensions you expect before proceeding with calculations.
Combining with Other Iotas
Matrices work seamlessly with vector and number iotas in arithmetic operations. After constructing your matrix, multiply it by vectors, add it to other matrices, or extract components for further use.
Practical Example
Gather position vectors from multiple entities, stack them into a matrix using vertical concatenation, then perform batch transformations or analysis on all positions simultaneously.