# Tagged Questions

The tag has no usage guidance.

93 views

### a function to extract all subexpressions from an expression

Can somebody help me with a function f such that it extract all sub expressions (i.e. looking down the expression tree) from any expression given to it and also a ...
74 views

### Proper formulation of Do expression [closed]

I'm having trouble with the following code: ...
36 views

### How Defer[1+Evaluate[1+1] work?

I want to generate some expressions. The expression is not evaluated expect some parts will evaluate first. A simple example is Defer[1+1+1] and in this expression ...
50 views

...
97 views

### How to overload the operator “*” as KroneckerProduct [closed]

Can I use the expression below a * b * c * d for short to instead KroneckerProduct[a,b,c,d] automatically when a,b,c,d are ...
72 views

### Solving equations with change of variables is not working?

I want to express it in the form $$\text{expr=}\int_{-\infty}^{\infty}C_1\exp\left(-t^2\right)f(t)dt$$, i.e., the integrand is a bounded smooth function $f(t)$ times $\exp(-t^2)$ and the domain of ...
309 views

### How to convert a string into a structured list

I am trying to use an efficient notation for the timing of sounds that i can play in Mathematica. I would like to parse the string "{ab{c{de}}f}" as the list ...
39 views

### Is it the correct syntax with TransformedDistribution?

I define a function as f[x_] := ...;which is in fact the PDF of a random variable $X$. The PDF if given by $f_X(x)$. Let $Y$ is a random variable, which is the ...
45 views

### How to find the lowest power in multi-variable expression?

I am sorry for asking similar question again, I asked How to find the lowest power of variable in expression? and I got wonderful answer, but I have a more question for multi-variable expression. One ...
96 views

### How to find the lowest power of variable in expression?

If I have expression like a1/x +a2/x^2 + a3/x^3 I want to return 1/x^3. In general case, ...
79 views

### Find most general 3-tensor under given constraint?

Consider A to be a general $2\times 2\times 2$ tensor: A = Table[ a[i,j,k], {i, 1, 2}, {j, 1, 2}, {k, 1, 2}]; pictorially one ...
203 views

### How to represent 1 as Symbol[“Integer”]

Maybe this is a boring question, but I cannot figure it out. Because every expression has a Head, and Head[1] is ...
50 views

### Convert string to function with an argument

I am trying to build an expression by first writing it out as a string and then using ToExpression to convert it to an expression. However, I cannot figure out how to make expression recognize x as an ...
230 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 ...
51 views

### What is the meaning of #, Root and & [duplicate]

I am new, but can any one tell me what is the meaning of formulas of x and y in the picture?
55 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 ...
70 views

### How to obtain differential consequences of linear transport equation automatically?

Motivation Here I've asked how to derive coefficients of numerical approximation of the linear transport equation $$u_t + u_x = 0, \tag{1}$$ on a fixed 3-point stencil automatically and here I've ...
50 views

### Misunderstanding of Replace code

I am looking for the right way to replace $\delta \, \, \text{by} \, \, 0.05 \, \, \, \beta \, \, \, \text{by} \, \, \, 1.77 \, \, \, \text{and} \, \, \, n \, \, \, \text{by} \, \, \, 12$ in this ...
64 views

### I have a term 'Keff' in terms of 'W'. I need to write 'W' in terms of 'Keff'. Does Mathematica provide an option for that

I have read similar answers on this topic. I am still not able to execute my code.The code is as follows. ...
59 views

...
74 views

### Defining a function to use in another function dependent on similar parameters [closed]

I want to define a variable dependent function which can be used to define another function which depends on the same variable and other variables. For example, I have a system where I define ...
40 views

### Determine class of special function from algebraic constraints?

Consider vectors x_i in arbitrary dimension. Let's say I have an expression in six variables F[x_1,x_2,x_3][x_4,x_5,x_6], which ...
113 views

### Find six vectors with rational entries under constraints?

Define six vectors v[i] with i=1,2,3...,6. Each v[i] is six dimensional and all entries in ...
103 views

### How does one initialize large arrays in Mathematica with a structured format? [closed]

I want to create a 10 by 10 matrix that increases by 1 every unit across like: 1 2 3 4 5 6 7 8 9 10 11..... Is there a function that does this without having ...
152 views

### How do I make a definition/function/method as I would in Java/MATLAB/Python

I've been trying to figure this out for a few hours now and it's driving me nuts. I am trying to confirm that, after transforming a Schrodinger equation, that the new wavefunctions satisfy the new ...
92 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: ...
55 views

### Subsituting expressions for expressions

I'm trying to define functions using other functions, like so: f[a_, b_] := a/b; a[c_] := c; b[d_] := d; Now what I want to be able to do is two things: ...
59 views

### What is the correct idiom for mapping a 0 value in a modulo n expression back to n?

What is the correct idiom for mapping the $0$ value in a modulo $n$ expression back to $n$. For example if I want to be sure that any integer value maps back to the index for a character in the ...
790 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$ ...
190 views

### Difference between Log and Log10 [closed]

I typed a function : f := Tan[(1/a)*Log[(Sqrt[x^2 + y^2])]] - y/x I assigned values: ...
245 views

### How to parse string to expression? [closed]

When trying to make a string an expression I see some wrong results: ...
237 views

### Creating a matrix under conditions

I would like to create a matrix whose elements satisfy the following conditions ( Mathematica 9 ) ...
97 views

### Arrange equation in normal form

Is there a way, or if not, how could one define a function which takes an equation in any form (for example as given by FullSimplify): $$(A+X_0) x+By=3x$$ and ...
536 views

### Elegant mehod of generating this matrix?

Good evening, I need to determine an elegant (as possible) method of computing an nxn matrix below (the matrix shown is just a 16x16 example). I've been toying with For loops, Tables, Bands, ...
118 views

### How to efficiently get a list like this?

I want a function myfun that generates list like this ...
51 views

...
117 views

### specified matrix query

can you tell me a way (best?) to get a matrix with i=N,j=N dimensions (quadratic) according to the following rules: variables: N , M, n the diagonal must contain zeros it must contain exactly M ...
143 views

### Write Integer powers as products

I need to wirte all occasions of (a+b)^3,Ftp^2, Sin[th]^2, ...etc as (a+b)*(a+b)*(a+b), Ftp*Ftp, Sin[th]*Sin[th], ...etc ...
46 views

### Code/Exp Search Documentation Center Mathematica

I have added several of my own applications to my Mathematica documentation center. Currently Mathematica uses followings notebook options to help the user search for specific functions. ...
937 views

### An inverted pyramid

I want to draw a pyramid approximately like this ...
228 views

### Why can't a string be formed by head String?

Since everything is an expression in Mathematica, why must a string object be formed by "abc" but not by a String[abc] ...
345 views

### Concatenating strings, unevaluated expressions and evaluated expressions/values

Maybe this is something very simple to some of you. Anyway, I think this can be useful to many others like me. I would like to build an output that involves strings, unevaluated expressions and ...
1k views

### Ragged Diamonds

diamond[n_Integer] := Table[1, {#}] & /@ (Range[n]~ Join~Range[n - 1, 1, -1]) diamond[5] // MatrixForm How could a more functional, "tablefree", solution ...
91 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: ...
1k views

### Efficient way to build a certain square matrix

For odd n I'm looking for a short and swift way to construct with (f.e.) n = 3 n = 11 ...
299 views

### How can I create a class of matrices programmatically?

I am trying to figure out how to create a function that can create the matrix pattern below, where: f[1] returns {{1}} ...
410 views