Skip to main content

Questions tagged [slot]

5 votes
1 answer
159 views

I would like to use variables in named slots referencing columns in Tabulars as I am used to in Dataset. But the behavior appears to be different, and I am hoping someone can explain what's actually ...
Whistler's user avatar
0 votes
1 answer
126 views

It may be a basic question, but if I use my pure function like the 4th line below, I got a syntax error. Could I know what I did wrong? ...
Soon's user avatar
  • 1,484
4 votes
1 answer
151 views

Background Information I have the following Mathematica code: ...
codebpr's user avatar
  • 3,028
3 votes
2 answers
149 views

I have the following association : ...
Jocelyn Minini's user avatar
0 votes
0 answers
56 views

I am making a FormFunction expression programmatically, based on external lists of questions and possible answers. Here is a toy example: ...
Gareth Russell's user avatar
0 votes
0 answers
88 views

When I run this code: ...
Red Banana's user avatar
  • 5,613
1 vote
0 answers
106 views

Problem. I work with a list and want to get the first element. For specific reasons I want to use # in combination with Map For example ...
Michiel van Mens's user avatar
2 votes
0 answers
97 views

I have an association like below and want to know how to properly phrase the value for winner. in this example, the answer should be "a". ...
Indiana's user avatar
  • 331
1 vote
2 answers
141 views

Using Mathematica, I was trying to get {#1,#2,#3,#4,#5}, using Table[#n, {n, 1, 5}] Instead I only got {#n, #n, #n, #n, #n} How can I get {#1,#2,#3,#4,#5},
cybervigilante's user avatar
7 votes
4 answers
486 views

I am trying to find a neat way of applying an operation to each list element, but do not know how to properly use multiple slots or whether it is actually possible to solve this with multiple slots. I ...
michelangelov's user avatar
3 votes
1 answer
228 views

I need to create an array of data which resembles to something like this Table[{i, Sin[j^2*i]}, {j, 2000}, {i, 0., Pi, Pi/10000.}] where each "row" of ...
Meclassic's user avatar
  • 1,065
0 votes
1 answer
209 views

I am trying to get a general function $f$ accept slot-holder arguments #1, #2, where the actual arguments are lists {a1, a2,...} and {b1, b2,....}. I thought that this would involve some combination ...
user195583's user avatar
0 votes
1 answer
144 views

I want to change my code from : f[n_, x_] := n Sin[x ] Table[{x, f[0, x], f[1, x], f[2, x], f[3, x]}, {x, -\[Pi], \[Pi],1.0}] // Chop with OUTPUT : ...
user444's user avatar
  • 2,836
2 votes
1 answer
140 views

I'll try to make this question more clear in a little while. In the mean time, I'll ask directly the question which motivated it: Latin Square from submatrix Original Question I want, for instance, ...
Adam's user avatar
  • 4,293
4 votes
1 answer
127 views

One convenient way to define a function is f[S,x_]:= 3 f[G,x_]:= 7 where the first parameter is not a slot but a constant. This way of constructing functions is ...
Denis Cousineau's user avatar

15 30 50 per page