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.

Filter by
Sorted by
Tagged with
1
vote
1answer
45 views

Symbol compute of Euler-Lagrange equation

If i have the Lagrange density function $$L(x,\dot{x}) = \frac{1}{2}x^2+ \frac{1}{2}\dot{x}^2,$$ The Euler-Lagrange equation is very simple by $$ \frac{d}{dt}\frac{\partial L}{\partial \dot{x}} - \...
6
votes
1answer
297 views

How can I self-define a keyboard entry for 3-dot "Because"?

In Mathematica, there already exists a keyboard entry for 3-dot "Therefore", which provides great convenience for input as shown below. However, I find it a little odd that for its ...
1
vote
1answer
45 views

How to create a simple transformation function on lists using short form of ReplaceAll?

I can easily do this with Map so the real goal of this exercise is to get a better grip on using transformation rules. Please help with this. The outputs should be ...
1
vote
1answer
47 views

How can I clear the symbol \[ImaginaryJ] for use for another purpose?

By default it is the same as imaginary unit, but I want to use it for split-complex numbers.
4
votes
1answer
59 views

Symbol scope in `SetDelayed` and `Evaluate`

In my previous question I described a problem, when one of the approaches I tried to use didn't work because of the interaction between Evaluate[] in combination ...
1
vote
0answers
42 views

Go back to a symbolic expression to evaluate derivative

I have the following code. ...
1
vote
1answer
101 views

Superscripts in Mathematica. What is it?

I am calculating a cross moment of a bivariate random vector from its moment generating function. The moment generating function includes the CDF of a bivariate normal distribution. After taking 2nd ...
3
votes
1answer
37 views

Position doesn't work for custom symbol within package

In a notebook, I can easily search an expression for a custom symbol. In[237]:= Position[{mySym, 1, 2}, mySym] Out[237]= {{1}} However, if I write a function and ...
2
votes
1answer
82 views

Can I tell whether a symbol is build-in (part of the System` library)?

I'd like a function that checks whether a symbol is a predefined part of the language or not. More generally, it might check whether it's part of a given package. ...
1
vote
1answer
59 views

Getting a symbol from a string without it being replaced by its value?

Consider the following code running on a fresh Mathematica session with no symbols defined: p[s_String] := Protect[s]; p["x"] This doesn't do anything ...
0
votes
0answers
29 views

Get the name of the elements in array and manipulate

I have an array: hline = {s0, d1, d1e, s1a, q1a, s1b, d2ae, d2a, s2a, q2a, s2bq, q2b}; each element is a matrix. I would like to generate another array, with ...
0
votes
0answers
73 views

Creating new variable names, Symbol or ToExpression

One can create new variable names by Symbol : In[1] Table[Symbol["x"<>ToString[i]], {i,1,5}] Out[1] {x1,x2,x3,x4,x5} But it is also possible to ...
3
votes
1answer
49 views

How can I label a table of histograms with the names of the data symbols, not the data themselves?

How can I label a table of histograms with the names of the data symbols, not the data themselves? If I want to make a table of plots with each plot labeled with the name of the function it plots, ...
3
votes
1answer
42 views

Type formation rules for 1-position expressions

I made a summary of the rules for formation of types for simple 1-position expressions, as I understand them. Here it is in textual form: A symbol, say, α, is a discrete entity, represented by a ...
1
vote
0answers
55 views

Alternatives to NumericQ that allow symbols to be considered numeric

I am writing a program in which I am using NumericQ. I am trying to allow symbols to also be considered Numeric, so I have been using NumericQ[a]=True for all of ...
2
votes
0answers
39 views

What sorts of expressions can be Solve'd for?

We can Solve for expressions that match _Symbol, as in Solve[x^2+1 == 0, x]—but we can also ...
0
votes
0answers
56 views

A function that maps Held symbol to string

Rougly my question is about constructing a function that maps Hold[var] to "var" even when var has an assigned value. In details : ...
0
votes
1answer
31 views

symbols in a function to "take on" the values of controls with the same names in Manipulate

(** I want the symbols a1... in f1... to "take on" the values of the controls with the same names in Manipulate[Plot[f1[3,"a"],{x,1,3}],{a1,0,1},{a2,0,1},{a3,0,1}]. Here's what I'...
2
votes
1answer
64 views

Print iota-like symbol

I want to print the following iota-like symbol: It is not available in the standard special characters. How to do it?
2
votes
0answers
55 views

Syntax highlighting for own functions only for certain symbols

For simplicity, let's say I have defined my own function f that takes in exactly one input argument which is of the Symbol type ...
1
vote
0answers
32 views

What does it mean by the Alternatives symbol a|z? [closed]

The following very simple code Resolve[Exists[{x}, x == 3 && a + z < x ]] gives the result ...
1
vote
3answers
64 views

How to set a value to the symbol denoted by a given string? [duplicate]

The code setString[name_String, value_]:= Evaluate[Symbol[name]] = value fails whenever Symbol[name] has already been assigned ...
0
votes
2answers
60 views

How can i replace the symbols in a list?

As you can see from the picture, how can I change all the "->" symbols to "-"?
1
vote
1answer
64 views

Mirroring the graph on the negative y axis

Another quick question, I have been trying to plot a phase plot, which has resulted in some issues. I know that there is a negative axis which it is also transposed on. However, when I include ...
4
votes
1answer
98 views

Transpose::nmtx error when using Greek Formal symbol in NDSolveValue

Bug introduced in 12.0 or earlier, persisting through 12.2. Consider the following call to NDSolveValue for a system of ODEs with 2 dependent variables, where we ...
1
vote
1answer
51 views

Programmatically defining variables

I seems as though what I am interested in is unconventional, but I am interested in defining a number of different variables programmatically. For example I can write a matrix of variables by doing: <...
3
votes
0answers
60 views

Mathematica Refuses to Output ContourIntegral and DoubleContourIntegral in Nice Mathematical Notation

I experience a strange behaviour of handling the Contour and Double Contour Integral symbols \[ContourIntegral] and \[DoubleContourIntegral] in Mathematica. Whatever I try theyy behave differently ...
0
votes
0answers
35 views

Bug with ValueQ involving fractions? [duplicate]

Expected behavior: ClearAll[f]; ValueQ[f[1]] False Unexpected behavior: ...
0
votes
0answers
54 views

Weird behavior of ℏ (\[HBar]) symbol on TensorExpand

I was trying to implement some tools to do commutators on quantum mechanics, just for fun. Then I noted a peculiarity: ...
1
vote
0answers
55 views

Mathematica says that a variable is not defined, yet it gives me a value [duplicate]

this is probably a dumb question (Mathematica noob here) but I can't figure out what's going on. I have a variable that I assign a value to and use, then later in the notebook I assign it a different ...
2
votes
0answers
102 views

How do you write the symbol of Sun in Mathematica?

How do you write the symbol of Sun in Mathematica? It is a circle with a small dot in the center (see here)
1
vote
0answers
33 views

Syntax highlighting for Symbolized variables in Solve

This is a duplicate of Syntax colouring when using Symbolize, but that post is almost eight years old and hasn't been active in almost four years. Is it possible to get normal syntax highlighting for ...
0
votes
0answers
48 views

How to write $I$ and $I_0$ as a symbol?

How could we write both $I$ and $I_0$ as a symbol in Wolfram Mathematica? I consider $I$ as a variable and $I_0$ as a parameter in my system of equations ($Y=C_0 + I, I=I_0+bY$, Y and I are endogenous ...
4
votes
1answer
70 views

Method for determining valid name syntax?

This question 40194 asks about work arounds to check and replace variable names which are invalid in a specific MMA function context. For that case testing using the function itself is the most ...
0
votes
0answers
40 views

How to DumpSave previously assigned symbols

I'm trying to DumpSave[] some variables based on their name string. To define them, I'm using ...
1
vote
0answers
80 views

How to figure out syntax for symbols?

I'm new to Mathematica and am having a hard time figuring out how to type certain symbols when I read the documentation. For example, in https://reference.wolfram.com/language/ref/...
2
votes
2answers
107 views

How to get the symbol name of a list element?

Let's say we have a list g with variable d as its element: Clear[g, d] g = {1,2,3,d} Now <...
2
votes
0answers
55 views

Issue with calling one notebook from inside another one

I am calling one notebook (N2) from inside another notebook (N1). The results are transferred correctly from the second notebook to the first one. But when I try to compare the results from the two ...
14
votes
4answers
847 views

When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

Yes I know there is no built-in native function called SymbolQ (but JavaScript does). However, could one be simulated to work for most cases? I often rely on ...
3
votes
1answer
150 views

Symbolized, Subscripted Variable Doesn't Look Pretty

Background I'm trying to programmatically generate a subscripted variable in a way that makes it appear "pretty". Here is a minimal working example that shows some strange behavior I'm ...
4
votes
1answer
55 views

Name of patterns cast as expressions from strings

I'm trying to match a part of a string while imposing conditions on the patterns, e.g.: StringCases["223", a: DigitCharacter ~~ b: DigitCharacter /; Unequal[a, b]] ...
1
vote
1answer
61 views

Default Options not working in user-defined function for SymbolName

Abstract I have a function objectName[symbol] that returns the SymbolName as both a standalone function or when nested inside ...
1
vote
0answers
27 views

How to make function return SymbolName or alternate name string if a function parameter is given [closed]

Abstract: I have a function objectName[...] that works just fine for variables (symbols) set to numerical results or strings which returns their unevaluated ...
2
votes
1answer
69 views

Are symbols automatically generated when defining a variable in the global context and what are symbols?

Abstract: I have noticed something really tricky with Mathematica and the documentation for symbols is short on clearing the confusion. It likely reveals what symbols are but it's not very prominent. ...
1
vote
1answer
39 views

Extracting name of symbol (variable name) from within a function not working

Abstract: I use a pattern so often that I needed to make a function for constructing it. A function getName[...] for extracting name of variable and value only ...
2
votes
1answer
88 views

How to use the SymbolName of variables along with Map and pure function

I want to label each point of a Graphics3D with the simplest method as possible. I tried many solutions like this : ...
12
votes
1answer
200 views

PlusMinus definition unexpectedly affects plotting

In version 10.1 I found a strange Plot behavior I did not anticipate. It seems that various heads including PlusMinus are ...
3
votes
1answer
57 views

Hold all the symbols from a huge list?

The two following codes work similarly: Num = 5; symbols = Hold[X1, X2, X3, X4, X5]; or ...
3
votes
0answers
83 views

Why are some symbols recognized by Mathematica but nowhere in the documentation? [duplicate]

I was trying to calculate a Groebner basis for a given set of polynomials, and I did it successfully. But I wanted to calculate the conversion matrix between the original basis and the Groebner basis....
4
votes
1answer
68 views

Custom function which behaves like `Evaluate`

Question Is there a way to define a function which evaluates itself regardless of HoldAll, HoldFirst, ... ? Background I'm ...

1
2 3 4 5 6