bsxcat(dim, varargin)
Version 1.1.0.0 (1.94 KB) by
Bruno Luong
Concatenate two arrays along a specific dimension with auto expansion of singleton enabled.
Examples:
Insert the zeros-row on top of 3x3 matrix
M = magic(3)
bsxcat(1,0,M)
Concatenate the ones-column on right of 3x3 matrix
M = magic(3)
bsxcat(2,M,1)
Cite As
Bruno Luong (2026). bsxcat(dim, varargin) (https://uk.mathworks.com/matlabcentral/fileexchange/32681-bsxcat-dim-varargin), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2011a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Creating and Concatenating Matrices in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
