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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -