# Matrix Attributes

**URL:** <https://forum.sensmetry.com/t/matrix-attributes/536>\
**Category:** Questions / Help\
**Tags:** sysmlv2\
**Created:** [July 21, 2026, 10:53am UTC](https://forum.sensmetry.com/t/matrix-attributes/536 "2026-07-21T10:53:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomBaker](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@TomBaker](https://forum.sensmetry.com/u/TomBaker)\
**Post date:** [July 21, 2026, 10:53am UTC](https://forum.sensmetry.com/t/matrix-attributes/536/1 "2026-07-21T10:53:28Z")

</div>

Hello,

Is it possible to specify a matrix as an attribute? I want to specify the attributes of an item with a 4x4 homogeneous transformation matrix.

Thanks!

Tom

---

<div class="post-metadata">

**Author:** ![VinceMolnar](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/vincemolnar/32/177_2.png) [@VinceMolnar](https://forum.sensmetry.com/u/VinceMolnar)\
**Post date:** [July 23, 2026, 11:08am UTC](https://forum.sensmetry.com/t/matrix-attributes/536/2 "2026-07-23T11:08:25Z")

</div>

Hello Tom,

You can use `Collections::Array`. You can set the size of rows/columns/etc. by redefining `dimensions`, then use the indexing operator (`#(i, j,...)`) to access and bind the elements. For example:

```auto
attribute my3DArray : Collections::Array {
    :>> dimensions = (3, 4, 5);
}
attribute oneCorner = my3DArray#(1, 1, 1);
attribute otherCorner = my3DArray#(3, 4, 5);

```

---

<div class="post-metadata">

**Author:** ![TomBaker](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@TomBaker](https://forum.sensmetry.com/u/TomBaker)\
**Post date:** [July 29, 2026, 11:14am UTC](https://forum.sensmetry.com/t/matrix-attributes/536/3 "2026-07-29T11:14:36Z")

</div>

Thanks Vince, that is helpful! How can I specify a “complete” item using these arrays? Like in the following example?

```auto
package Ontology {
    enum def SoftwareDataType {
        double;
    }
}

package Model {

    private import SI::*;

    item def MotionVector {
        doc 
        /* A 6 DoF motion vector, ordered as translational velocity (x, y, z) followed by rotational velocity (a, b, c)
         */

        attribute motionVector : Collections::Array {
            :>> dimensions = (6, 1);
        }

        attribute x_velocity = motionVector#(1, 1) {
            doc /* Translational velocity along the frame's x-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::speed default 0 [m / s];
        }

        attribute y_velocity = motionVector#(2, 1) {
            doc /* Translational velocity along the frame's y-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::speed default 0 [m / s];
        }

        attribute z_velocity = motionVector#(3, 1) {
            doc /* Translational velocity along the frame's z-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::speed default 0 [m / s];
        }

        attribute a_velocity = motionVector#(4, 1) {
            doc /* Rotational velocity about the frame's x-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::angularVelocity default 0 [rad / s];
        }

        attribute b_velocity = motionVector#(5, 1) {
            doc /* Rotational velocity about the frame's y-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::angularVelocity default 0 [rad / s];
        }

        attribute c_velocity = motionVector#(6, 1) {
            doc /* Rotational velocity about the frame's z-axis. */
            attribute dataType = Ontology::SoftwareDataType::double;
            attribute unit :> ISQ::angularVelocity default 0 [rad / s];
        }

    }
}

```

When extracting from the model (for example to auto-generate a software interface), how would I know which attribute(s) to choose?

Thanks!

Tom

---

<div class="post-metadata">

**Author:** ![TomBaker](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@TomBaker](https://forum.sensmetry.com/u/TomBaker)\
**Post date:** [July 29, 2026, 11:25am UTC](https://forum.sensmetry.com/t/matrix-attributes/536/4 "2026-07-29T11:25:14Z")

</div>

I’m basically trying to formalize the following .toml file using SysML v2.

```auto
[[software_interface.topic.software_datum]]
name = "MotionVector"
dimension = [6]
data_type = "double"
engineering_units = "[m/s, m/s, m/s, rad/s, rad/s, rad/s]"
description = """A 6 DoF motion vector, ordered as translational velocity (x, y, z) followed by rotational velocity (a, b, c)."""

```
