Questions tagged [expression-construction]
The expression-construction tag has no usage guidance.
108
questions
0
votes
1
answer
134
views
How to pass an expression as list elements for a Mathematica command
I'm trying to build a generic function that will calculate sums on different iterators.
To simplify let consider:
...
0
votes
0
answers
65
views
Transform String to Expression [duplicate]
I have a variable postVector and another called CHKpostVector. Both are global variables.
Only the variable ...
2
votes
3
answers
3k
views
How to define constants in Mathematica like c1,c2,c3,...cn?
Manually defining the constants is tedious if the 'n' is large. how to do this?
3
votes
1
answer
105
views
Generate multivariate monomials with constraints
I'm trying to generate multivariate monomials in variables $p_1, \ldots, p_n$. Each monomial has either $p_i$ as a factor, otherwise $(1-p_i)$. I need to generate all monomials which have exactly $k$ ...
3
votes
1
answer
95
views
Creat a matrix with boundary condition
I would creat a symmetric matrix, but how can I set the boundary in Subscript?
...
7
votes
2
answers
234
views
Constructing expressions using Sum vs Array[... Plus] vs Plus@@Table[...]
For constructing a sum of terms which are symbolic, I noticed that in addition to
...
-4
votes
1
answer
87
views
Translation of GLSL expression (2) [closed]
What's the most compact WL translation of this GLSL expression:
length(max(vec2(x,y),s))
?
0
votes
0
answers
103
views
Generate a system of linear differential equations from a coefficient matrix
I want to generate a system of linear equations that is stable. For that I generated random coefficients and divided the 10 by 10 matrix by the largest eigenvalue and set the diagonal to -1:
...
22
votes
4
answers
1k
views
Is expression in Mathematica well defined?
According to Mathematica, everything is an expression. So an atom is also an expression. But in other parts of documentation, they say that an expression is of form ...
1
vote
0
answers
108
views
How to send Map[Plus[1, #] &, {1, 2, 3}] to Mathematica from C# via IKernelLink?
Here is a piece of my code
...
5
votes
6
answers
1k
views
Replace element of a matrix with condition
consider a matrix
$\left( \begin{array}{ccccc} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 1 & 1 & 0
\\ \end{array}\right)$
How do I do a program that does these steps
1-Replace each ...
4
votes
4
answers
475
views
Generating a family of 0-1 matrices satisfying a particular property
I'm looking for an elegant way to generate the set of all possible matrices that satisfy the following properties:
Each matrix has 9 rows and c columns, where 1<=c<=9.
Each matrix has exactly ...
10
votes
3
answers
184
views
Graph that shows how symbols are used in an expression
I would like to make a graph to show how symbols build up an expression. For example, the matrix multiplication
$$
\left(
\begin{array}{ccc}
a & b & c \\
d & e & f \\
\end{array}
\...
-1
votes
1
answer
51
views
Producing the same output as Tuples[{0, 1}, 4]? [closed]
How can I use the functions decimalToBinary and padWithZeros to produce the same output as ...
4
votes
3
answers
327
views
Handling multi-part equations
How are multi-part equations best handled? For example, take the torsion equation:
We could express part of this equation like this:
...