Group 9
J symbol (hash): #
Monadic case:
Name: tally/count
Rank: _ (infinity/unbounded) – applies to entire array
Definition: # y returns the number of the items of y.
Please also include explanations for your answers to some of the following questions:
What is the result when y is a vector, or a matrix?
What is the result when y is an empty vector (e.g., # 0$0), or an empty matrix (e.g., # 0 4$0)?
Why is the # 0 4$0 not the same as # 4 0$0 ?
Dyadic case:
Name: copy
Rank: 1 (left); _ (right) – applies to a vector on the left and the entire array on the right
Definition (scalar x): x # y returns x copies of the items of y.
Definition (vector x): x # y returns xi copies of the yi items of y, where i is the position of element in x and the item in y. (In this case, the length of the vector x must be the same as the number of items in y.) If x is a complex number ajb, then the result is a copies of item y and b copies of the fill element. The fill element is 0 for numeric arrays, space for literal arrays, and box for box arrays.
Please also include explanations for your answers to some of the following questions:
What is the result when x is a number and y is a vector?
What is the result when x is a number and y is a matrix?
What is the result when x is a vector and y is a vector?
What is the result when x is a vector and y is a matrix?
What is the result when x is a complex number?