# Questions tagged [syntax]

Questions on correct (or improved) formulation of Mathematica code to achieve particular results. Use this tag (not "symbol") for questions about all those odd @@ /@ # & and ~ characters.

765 questions
Filter by
Sorted by
Tagged with
2answers
52 views

### Syntax error using Plot

Why is the error coming and what should I do to resolve it The code is ...
0answers
40 views

### Mathematica Syntax - Mixing commands with text [duplicate]

Simple question but couldn't find answer anywhere.. I'm trying to write a coordinate of a point as such: "(" Subscript[x, k] "," Subscript[y, k] ")" But the output is ...
1answer
69 views

### Convert numbers to rational numbers with the same denominator

Is it possible to modify an answer so that all numbers have the same denominator? E.g. Table[(27 - k)/15, {k, 0, 29}] returns ...
0answers
42 views

1answer
37 views

### Issue with Compile for Complex Input/Output

I'm writing a Runge-Kutta algorithm for solving a system of coupled differential equations. My code works fine when defined as a module, but when I try to compile it, I get the following error: ...
2answers
72 views

### Isn't there a better way to display mathematical equations as labels, in Manipulate[ ] etc.?

I often want to output a mathematical equation in a text environment, and I find it very cumbersome and often the result is also not satisfactory. This example out of the "Advanced Manipulate ...
2answers
110 views

### Define derivative as a new function

Iβm coding my first physics simulation in Mathematica, and have a problem. I want to do the following inside a single cell input. ...
2answers
313 views

### Why does 'Transpose[list]' work but 'Map[Transpose[#]&, list]' not when attempting to transpose a 2D-array list? [closed]

I define this list: list={{100,100},{200,200}} Taking the transpose like this works as intended: Transpose[list] Taking ...
0answers
47 views

### How do I set a control in an “If” statement?

I have the following lines of code: ...
2answers
58 views

### Problem with internal variable of a Module which returns the solution of an NDSolve command. y\$25947 β InterpilatingFunction[β¦]

I will try to give a minimal example of my problem. Say I define the following function, spitting out an NDSolve result, using ...
0answers
22 views

### Manipulating a system of equalities into particular form

newbie here just trying to learn the Mathematica syntax. I have a list of equations, some of them definitions, others relationships, as follows: ...
2answers
45 views

### Plotting a complete response to an oscillation; already have particular solution, not sure how to solve for constants in homogeneous solution

I am writing a code that plots an oscillator's response to a periodic excitation. The response consists of the following: x(t) = xh + xp where xh is the homogeneous solution and xp is the particular ...

1
2 3 4 5
β¦
16