Google "help matlab cat"
Say I have two 2x2 matrices A and B. If I use the command
then c(:,:,1) is A and c(:,:,2) is B. Now, if I use c=cat(2,a,b) I get a rowe, and if I use c=cat(1,a,b) I get a 2x2 matrix. What is the logic behind the last two commands?Code:c=cat(3,a,b)
http://www.mathhelpforum.com/math-he...t-command.html, but why does it add the matrices vertically when using the first dimension and horizontally with the second dimension? They do now explain that.
Is it just a convention?