Linked Questions

4 votes
2 answers
293 views

I would like to plot a function but have a domain defined elsewhere as follows: xrange = Sequence[0, 2π]; Plot[Sin[x], {x, xrange}] However, this doesn't work ...
Cosmic Sleuth's user avatar
9 votes
1 answer
212 views

For reusable code it's good practice to use Module[] to localize iteration variables used by Table[], as explained by this post. ...
felix's user avatar
  • 579
6 votes
1 answer
775 views

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
Jagra's user avatar
  • 14.7k
3 votes
1 answer
2k views

I want to return a Hold expression but with some parts pre-evaluated. The easiest way to explain this is probably through code example. Here is what I have ...
Saran Tunyasuvunakool's user avatar
3 votes
3 answers
473 views

Consider I have a list l ...
Michael's user avatar
  • 143
3 votes
3 answers
217 views

I have an estimation routine I have coded up, I want now to do some tests on it where I pick a particular parameter and run the estimation for differing values of that parameter. What I want is to be ...
Matthew's user avatar
  • 33
4 votes
1 answer
435 views

First, we load some tools related to Compile for analysis. ...
matheorem's user avatar
  • 17.7k
4 votes
2 answers
359 views

question is as follows define a list ttt={1,2}; and if I set values in this way {ttt[[1]],ttt[[2]]}={3,4} then the value ...
matheorem's user avatar
  • 17.7k
5 votes
1 answer
205 views

Let's say I want to take this plot: r = 3; DensityPlot[x^2 + y^2, {x, -r, r}, {y, -r, r}] and make the x and y limits be returned from some function (maybe because ...
dalamajama's user avatar
4 votes
1 answer
472 views

I want the function to take in string, then assign a value to its corresponding symbol. An implementation using ToExpression is ...
vapor's user avatar
  • 7,961
7 votes
1 answer
274 views

Boxes may be represented as expressions or as strings. How can I convert between the two forms? In particular, how can I convert from the string representation to the expression representation? ...
Szabolcs's user avatar
  • 239k
1 vote
1 answer
275 views

I would like to override the behavior of Dot, so that Dot[u,v] will return a scalar instead of a 1x1 matrix in the case that the ...
John McGee's user avatar
  • 2,548
3 votes
2 answers
338 views

I would like to get a list of variable names as strings. For example, x = 1; y = 2; Map[SymbolName, Unevaluated /@ Unevaluated@{x, y}] {"x", "y"} This works ...
Yi Wang's user avatar
  • 7,477
3 votes
2 answers
246 views

I store a reference to the association in a held expression in a variable: a=<||>; b=Hold[a]; And in the code, I want to do manipulations with the original ...
grandrew's user avatar
  • 550
0 votes
1 answer
216 views

This is a contrived example, but it gets the point across. I am looking to use the following as inputs: ...
mmorris's user avatar
  • 1,172

15 30 50 per page