Skip to content

Unit for matrix with unknown size #25

Discussion options

You must be logged in to vote

By using the matrix class as an attribute type, as in the example here, a unit can be assigned to the attribute.
G+[(matrixTest:ClassA)] matrixTest.m = #[#[1,2,3],#[2,3,4],#[3,4,5]].unit("h")

However, the matrix class as an attribute type is not supported in the solution path generator (SPG).
An implementation of arbitrary matrices with Unit[h][,] is not planned, as the equation environment performs a unit check as well as a dimension check and this is not possible without knowledge of the use of the classes. Matrices with undefined dimensions are often used as data storage and not as equation variables.

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by iils-parnold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants