Using Julia version 1.7.3, my understanding is that the following initializes matrix to be a 9 × 9 matrix each of whose elements is undefined …
matrix = Array{Char}( undef, 9, 9 )
println( matrix )
display( matrix )
println( )
println( typeof(matrix) )
println( size(matrix) )
Also, I understand that the expression [ c for c = '1' : '9' ] evaluates to a column vector of 9 characters (type Vector{Char}).
How does one combine the above to create a 9 × 9 matrix each of whose 81 elements is the column vector [ '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9' ] ? (My expectation is that each column vector element will be modified in the program I plan to write.) My best guess so far is …
matrix = Array{Vector{Char}}( [ c for c = '1' : '9' ], 9, 9 )
Attempting to do so results in …
ERROR: LoadError: MethodError: no method matching (Array{Vector{Char}})(::Vector{Char}, ::Int64, ::Int64)