Add a row to a matrix in Julia? -
how can add row matrix in julia?
for example,
mat = [1 2 3; 3 4 2] and want add row x = [4 2 1] @ end. tried:
push!(mat, x) but gives error.
for concatenation of matrix such way can so:
mat = [mat;x] or use function vertical concatenation:
vcat(mat,x) read more these operations in documentation.
Comments
Post a Comment