Question T551
Visible to All Users

Sum the data from two matrix into a third matrix

created 7 years ago

We have three matrixes which are pretty much identical. The first two matrixes asks for users to input their data. The thrid matrix however takes the values from the first two matrix and adds them up by the row and column.

Below is a visual example. Also attached is the json and an image

Matrix 1
<xxx> <1c1> <1c2> <1c3>
<1r1> <1d1> <1d2> <1d3>
<1r2> <1d4> <1d5> <1d6>

Matrix 2
<xxx> <2c1> <2c2> <2c3>
<2r1> <2d1> <2d2> <2d3>
<2r2> <2d4> <2d5> <2d6>

Matrix 3
<xxx> <3c1> <3c2> <3c3>
<3r1> <1d1 + 2d1> <1d2 + 2d2> <1d3 + 2d3>
<3r2> <1d4 + 2d4> <1d5 + 2d5> <1d6 + 2d6>

Comments (1)

    I've prepared a working sample for you
    https://plnkr.co/edit/Tdmh1U?p=preview

    Thanks, Serge
    SurveyJS Team