Also, don’t you really want a vector? In which case I think the best practice is vec(x) or reshape(x, :).
vector
vec(x)
reshape(x, :)