array_group -> list_to_matrix fixes

This commit is contained in:
Adrian Mariano
2021-10-26 23:17:21 -04:00
parent 71dab62432
commit 2eff8ec203
6 changed files with 10 additions and 8 deletions

View File

@@ -321,7 +321,7 @@ function submatrix_set(M,A,m=0,n=0) =
// Description:
// Constructs a matrix by horizontally "stacking" together compatible matrices or vectors. Vectors are treated as columsn in the stack.
// This command is the inverse of `column`. Note: strings given in vectors are broken apart into lists of characters. Strings given
// in matrices are preserved as strings. If you need to combine vectors of strings use array_group as shown below to convert the
// in matrices are preserved as strings. If you need to combine vectors of strings use {{list_to_matrix}} as shown below to convert the
// vector into a column matrix. Also note that vertical stacking can be done directly with concat.
// Arguments:
// M1 = If given with other arguments, the first matrix (or vector) to stack. If given alone, a list of matrices/vectors to stack.
@@ -344,7 +344,7 @@ function submatrix_set(M,A,m=0,n=0) =
// strmat = [["three","four"], ["five","six"]];
// e = hstack(strvec,strvec); // Returns [["o", "n", "e", "o", "n", "e"],
// // ["t", "w", "o", "t", "w", "o"]]
// f = hstack(array_group(strvec,1), array_group(strvec,1));
// f = hstack(list_to_matrix(strvec,1), list_to_matrix(strvec,1));
// // Returns [["one", "one"],
// // ["two", "two"]]
// g = hstack(strmat,strmat); // Returns: [["three", "four", "three", "four"],