On the command line, repmat gets tedious. mop fixes that. Don't use it in a function, though, because it will slow it down. It's just meant for command-line convenience.
Example. A = size(m, n) and b = size(m, 1), size(1, m), size(n, 1), or size(1, n). Call
mop(A, '+', b)
mop(b, '+', A)
to transpose b as necessary and repmat b to match A's size.
Andrew (2021). Use mop instead of repmat on the command line for convenience. (https://www.mathworks.com/matlabcentral/fileexchange/40908-use-mop-instead-of-repmat-on-the-command-line-for-convenience), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!