size_equal
Test whether all inputs share the same shape.
Syntax
Section titled “Syntax”tf = size_equal(a, b)tf = size_equal(a, b, c, ...)Description
Section titled “Description”Returns scalar true when every argument has the same dimension vector. Trailing singleton dimensions are tolerated — size_equal(zeros(3,4), zeros(3,4,1)) returns true. With fewer than two arguments, returns true trivially.
Examples
Section titled “Examples”size_equal(zeros(3,4), ones(3,4)) % 1size_equal(zeros(3,4), ones(4,3)) % 0size_equal([1 2 3], [4 5 6], [7 8 9]) % 1