Skip to content

Broadcasting addition for mimo systems #416

@albheim

Description

@albheim

As mentioned by @olof3 in #166 we currently have that addition works between mimo system and scalars. Addition of scalar matrices also works, but broadcasting does not work.

ss(-ones(2,2), ones(2,2), ones(2,2), zeros(2,2)) + 1 # A, Works
ss(-ones(2,2), ones(2,2), ones(2,2), zeros(2,2)) + ones(2, 2) # B, Works
ss(-ones(2,2), ones(2,2), ones(2,2), zeros(2,2)) .+ 1 # C, Does not work

This operation has to mean that one wants to add something to the D matrix (or equivalently to the matrix of transfer functions) which means we are doing matrix-scalar addition in the mimo case, and it just seems a bit off that we handle it differently then the rest of the julia ecosystem.

I see the problem that we represent a siso system as a 1x1 array of systems and then that would also fall into the same category of matrix-scalar addition, so I'm not sure what would be the nicest solution.

Works fine as it is now so I'm in no hurry to do anything about it, but thought I would document it since I closed the old issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v1Issues to resolve before releasing v1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions