code: public Matrix insertColumn(int j, Vector column) {
          if (j > columns || j < 0) {
              throw new IndexOutOfBoundsException("Illegal column number, must be 0.." + columns);
          }
  
          Matrix result;
          if (rows == 0) {
              result = blankOfShape(column.length(), columns + 1);
          } else {
              result = blankOfShape(rows, columns + 1);
          }
  
          for (int jj = 0; jj < j; jj++) {
              result.setColumn(jj, getColumn(jj));
          }
  
          result.setColumn(j, column);
  
          for (int jj = j; jj < columns; jj++) {
              result.setColumn(jj + 1, getColumn(jj));
          }
  
          return result;
      }
docs: Adds one column to matrix.
  @param j the column index
  @return matrix with column.