Closed alexvong243f closed 2 years ago
While help repmat
doesn't give us any information about this, help repelem
seems to suggest the current hehaviour of repmat
(but not @sym/repmat
) is the correct one.
'repelem' preserves the class of X, and works with strings, cell
arrays, NA, and NAN inputs. If any R_J is 0 the output will be an
empty array.
repelem ("Octave", 2, 3)
=> OOOccctttaaavvveee
OOOccctttaaavvveee
repelem ([1 2 3; 1 2 3], 2, 0)
=> [](4x0)
See also: cat, kron, repmat.
Fixed in 65da8ab60c3a7b46a285697e20a1425ced570e6b
Currently,
repmat(sym([1 2; 3 4]), 3, 0)
outputsans = (sym) [] (empty 3×0 matrix)
But
repmat([1 2; 3 4], 3, 0)
outputsans = [](6x0)
Which one is the correct behaviour? I don't think SMT documentation mentions this...