Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1127 time(s) in 723 post(s)
|
Hello, here are my observations with build 4559. Highlighting is done for what I think is inconsistent. - linear indexing using just index values beyond the limits is now suppressed ("Requested matrix element does not exist" ):
el(mat(1,2,3,4,5,6,7,8,9,3,3),1,5)=#@#
- linear indexing using a single index works as announced, uses row ordering:
el(mat(1,2,3,4,5,6,7,8,9,3,3),4)=4@#
- linear indexing beyond the number of elements is now suppressed. The error message "Argument doesn't match to expected kind" is wrong. Should be "Requested matrix element does not exist"
el(mat(1,2,3,4,5,6,7,8,9,3,3),10)=#@#
- linear indexing does not work with matrix-valued functions (like transpose, inverse, etc), unless they are "eval"uated. Message "Argument doesn't match to expected kind"
el(transpose(mat(1,2,3,4,5,6,7,8,9,3,3)),7)=#@#
- column ordering is achieved by the following slightly cumbersome expression
el(eval(transpose(mat(1,2,3,4,5,6,7,8,9,3,3))),7)=3@#
- Nested el work (but do not try to transpose any of the sub-matrices)
el(el(el(mat(1,2,3,4,mat(1,2,3,4,5,6,7,8,mat(1,2,3,4,5,6,7,8,9,3,3),3,3),6,7,8,9,3,3),5),3,3),7)=7@#
I would expect el(1), i.e. linear indexing, to work on any matrix valued function. Currently, it seems to work for expressions of type mat() and el(). el(2) has no problems with matrix valued functions: el(el(el(mat(1,2,3,4,mat(1,2,3,4,5,6,7,8,transpose(mat(1,2,3,4,5,6,7,8,9,3,3)),3,3),6,7,8,9,3,3),5),3,3),1,2)=4@#Best regards, Martin |