All Questions
Tagged with expression-construction list-manipulation
19
questions
1
vote
2
answers
194
views
How to sort out/ extract positive and negative powers as list?
I have the following expression
expr = x1^d1 * x2^d2 * x3^d3;
where d1,d2,d3 can contain negative values/expression i.e. in ...
0
votes
1
answer
178
views
Help with printing table data
I am looking for the way of building a Table in a fast way. My true table evaluates huge functions with a system of differential equations . Let us for simplicity consider 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$ ...
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
...
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 ...
1
vote
2
answers
95
views
How to generate expression a + a1 e1 + a2 e2 + a12 e12 (subscripted)?
Sorry to ask this twice. I thought I could get away with just a0 + a1 e1 + a2 e2 + a3 e1 e2, but for my application I can't. I can generate a + a{1} e1 + a{2} e2 + a{12} e12 (subscripted), but that's ...
1
vote
4
answers
369
views
How can a generate an expression like a0 + a1 e1 + a2 e2 +a3 e3 + a4 e1 e2 + a5 e1 e3 + a6 e2 e3?
I wish to input n and then generate an expression. It would look like the above when $n = 3$. I would like to use subscripts for ...
9
votes
5
answers
2k
views
Create a list of all possible multivariate monomials of a certain order
Given variables x[i] for i=1,2,...,n I would like to create a list of all possible multivariate monomials of order ...
3
votes
3
answers
360
views
Specify number of elements instead of step in Table [duplicate]
I think I have seen what I was looking for a ong time ago but I can't see nothing such in documentation.
Quite often, I would like to create a Table with given ...
1
vote
1
answer
262
views
Is there a way to convert a string to a Table indicator? [closed]
I have a list like this:
list = {"k1","k2"}
I want to use the elements in the list as Table indicators:
...
4
votes
4
answers
963
views
Writing a circular matrix
I have two square matrices, $A$ and $B$, of the same size, say, of $m \times m$. What I want is to write a programme/function of three variables, $A$, $B$ and $n$, that outputs the $mn \times mn$ ...
4
votes
3
answers
923
views
Creating a matrix under conditions
I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 )
...
7
votes
5
answers
654
views
Elegant method of generating this matrix?
Good evening,
I need to determine an elegant (as possible) method of computing an $n\times n$ matrix below (the matrix shown is just a $16\times16$ example). I've been toying with ...
2
votes
2
answers
138
views
How to efficiently get a list like this?
I want a function myfun that generates list like this
...
1
vote
2
answers
369
views
Generating an Array of Vectors
I'm working a lot with nested lists of $(x,y)$ coordinates (of a FEM-like mesh, but that's not important), like so:
...