Lets say I have a mutable struct:

mutable struct a
    x :: Float64

For whatever reason I want to concatenate a matrix and a vector of my a:

b = Matrix{a}(undef, (0, 2))
c = [a(2.), a(3.)]
vcat(b, c)    # ERROR: ArgumentError: number of columns of each array 
# must match (got (2, 1))

How can I add my vector c as a new row on the bottom of b?

Note: I realise that c should be a row vector, but the operator ' (ie. c') cannot be applied to Vector{a, 1}, which is part of the problem.

(Visited 22 times, 1 visits today)