I have a function g[x,r] yielding a 3x1 vector, where x is a 9x1 vector and r is a 3x1 vector.
Now I define multiple r by:
R = Array[Subscript[r, ##] &, {3, N}]
Now I want to construct
G[x_,R_] := {g[x,r_1],g[x,r_2],g[x,r_3],...,g[x,r_N]}
Where r_i is the ith column vector of R, and G should be a 3Nx1 vector. I reckon I would have to use Map or Outer, but cannot see how.
Blankwhich is a pattern object that can stand for any Wolfram Language expression. – rhermans Apr 26 '17 at 16:29Subscriptwhile defining symbols (variables).Subscript[x, 1]is not a symbol, but a compound expression whereSubscriptis an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]which is to assign a Downvalue to the opratorSubscriptand not an Ownvalue to an indexedxas you may intend. Read how to properly define indexed variables here – rhermans Apr 26 '17 at 16:30MapAt– rhermans Apr 26 '17 at 16:34