MATLAB: What does the symbol “;” mean in the statement “p1 = [x; y]”

concatenationvertical concatenation

What does the symbol ";" mean in the following statement?
p1 = [x; y];

Best Answer

Hi,
this means x and y are combined vertically to a new vector. So p1 = [x;y] creates a vector
p1 = (x)
(y)
Or simply try it with an example
p1 = [1;2]