Questions tagged [symbols]
Mathematica symbols are the ultimate atoms of symbolic data. Every symbol has a unique name, exists in a certain Mathematica context or namespace, and can have a variety of types of values and attributes.
357 questions
6
votes
2
answers
279
views
What makes y = 0 and y = 1 different in `Table[x + y /. x -> 420, {x, 3}]`?
Table[x + 0 /. x -> 420, {x, 3}]
Table[x + 1 /. x -> 420, {x, 3}]
The above program gives the following result.
...
2
votes
1
answer
65
views
Wrong span on math/unicode symbols
I'm facing an issue with broken span of unicode/math characters in newer versions of Mathematica, as you can see below.
Setting the option SpanSymmetric to false ...
3
votes
0
answers
96
views
Is this kind of symbolQ function possible?
I'm wondering if it's possible to define a symbolQ function that behaves like NameQ but operates on symbols. My curiosity is ...
4
votes
1
answer
203
views
Head of functions and symbol confusion
I am having trouble understanding how functions work in mathematica. Consider the following.
...
0
votes
0
answers
110
views
Mathematica package: How to make results of a calculation accessible while keeping intermediate results private [duplicate]
I want to write a Mathematica package which on being loaded, performs some calculations such as
...
4
votes
2
answers
270
views
Reorder indices alphabetically in each term of a sum
Here is a challenge for you. I have an expression that has an arbitrary number of terms that look like
...
4
votes
1
answer
203
views
How to use a symbol as both function and head?
To explain better what I mean I'll give an example of what I want the symbol to do. I want a symbol that wraps around a unit vector to use it as head for further calculations.
Something like:
...
4
votes
1
answer
146
views
Issue with a Button to unformalize when applying to a list of symbols
Considering the Lukas Lang’s solution to formalize symbols with a Button, given in the post: How can I create a shortcut to convert "normal Symbol" to ...
0
votes
0
answers
94
views
How to make a palette button to define subscripts as symbols
I want to have a palette that includes a button for defining subscripted variables as symbols. As this is only needed once per session, I also want the button to change colour when pressed. The code I ...
4
votes
2
answers
243
views
How to generate unique symbols inside a module that can also be used for pattern names?
I am trying to write code inside module, which will generate general pattern. The problem is that the number of terms in the pattern depends on the the input. So I can not hard code the pattern inside ...
0
votes
0
answers
85
views
Front end fails to turn symbol black after definition, how to fix and why is it happening?
I occasionally get issues where I'm doing a expensive calculation and the symbols I'm assigning the outputs to do not become black after assignment. The value is correctly updated, but the symbol ...
0
votes
1
answer
138
views
Symbol in Global Context but List in Module and Block? [duplicate]
Can someone explain the principles underlying the following behavior.
I define the list testD, and then use a Do loop to change values in the list (I realize there are smarter ways but they don't fit ...
-1
votes
1
answer
109
views
When symbol or name of calculated value needs to be mentioned once again [closed]
thC = 1.2; aa = 1.0;
QQQQ = (thC + aa + 0.8)
(* How to write "QQQQ"name/symbol once again in the next line after its value (3.) is printed ? *)
It is too ...
5
votes
2
answers
327
views
Recognizing Named Characters
I am trying to determine Special Characters - maybe hasSymbolFormQ is not the best name for my intended function in this regard:
...
1
vote
1
answer
107
views
How to convert symbols like x1 to $x_1$, but handle differentials like dH1 to $dH_1$ in Mathematica?
I need help with a symbol transformation in Mathematica. I want to convert symbols such as x1 to Subscript[x, 1], but I need to handle differentials (as simple ...