Reputation: 3177
Given two numbers: M, N, how to create a matrix: res = MxMxMxMxM...xM, where ndims(res) == N.
M, N
res = MxMxMxMxM...xM
ndims(res) == N
Upvotes: 1
Views: 136
Reputation: 36710
Generate the Array [M,M,M...] and pass it:
[M,M,M...]
nan(repmat(M,1,N))
Upvotes: 3