code: function matrix(rows, columns, values) {
      // console.log(values);
      const res = [];
      let row = [];
      let real;
      values.forEach((v, i) => {
          if (i % 2 == 0) {
              real = v;
          } else {
              row.push({
                  real: real,
                  imag: v
              });
              if ((i + 1) / 2 % columns == 0) {
                  res.push(row);
                  row = [];
              }
          }
      });
      return res;
  }
docs: matrix returns a matrix of which values are given ones.