I have a matrix of observations and I want to add a constant vector as the first row of my matrix. How can I concatenate these two variables in GAUSS?
For matrices and vectors use the tilde (~) operator for horizontal concatenation and the pipe (|) operator for vertical concatenation. For example if you have two 5x1 vectors A and B, you can concatenate them into a 5x2 matrix like this:
newMat = A ~ B;
You could vertically concatenate them into a 10x1 vector like this:
newVec = A | B;
String arrays use the tilde (~) and pipe (|) operators, but they are prepended with the dollar sign ($). For example:
stringArrC = stringArrA $~ stringArrB;
stringArrD = stringArrA $| stringArrB;