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
6
votes
2answers
184 views

Should I Protect function's options

I'm trying to figure out what is the best way to protect symbols within a package (a function's options in particular) so that no other value can be assigned to it. Consider a function ...
6
votes
2answers
196 views

How to convert a list of variable names into a list of formal symbols?

I have a lists of variable names that include greek letters. names = {"a", "b", "μ", "Σ"} I would like to construct a lists of formal symbols from these such the ...
7
votes
2answers
201 views

Efficient Search for specific Terms in symbolic Expression

I have a large symbolic expression with six variables a,b,c,d,e,f per term, roughly like this: ...
0
votes
1answer
89 views

ToString get local name of the symbol

I am using ToString to convert symbols to a string. So my entire code is written assuming ToString[a] will return ...
1
vote
0answers
17 views

Substitute variable inside manipulate [duplicate]

Consider the following piece of code ...
0
votes
1answer
76 views

Assign a value to the protected string [duplicate]

How can I assign a value for a symbol composed of a string plus and another string converted from integer? n=3; Symbol["as"<>ToString[n]]=4; So I want to ...
3
votes
1answer
376 views

Defining a symbol e that represents plus-minus-one, so that e^2 == 1 and e^3 == e

I have a variable (say, e) that can assume only the values $1$ or $-1$. My calculations are extensive and if I introduce the symbol ...
5
votes
1answer
243 views

How to create new custom symbols like \[Wolf]?

In Mathematica, we can often get very special symbols by typing esc ... esc or \[...], such as the Wolf or Mathematica's logo. ...
2
votes
1answer
126 views

Why is my variable Lambda defined but not the others?

I would like to understand why in the following code, my variable Λ is recognized by the system but not n. In fact for me ...
5
votes
2answers
380 views

Symbolize Does Not Work in `.m` Files or What?

I have a .nb (notebook) file which I should convert to a .m (mathematica package) file to run it remotely from command line of a ...
2
votes
2answers
181 views

Halting Symbol Transformations for Function Arguments

I think the simplest way to state my question is to give an example: x=2; f[x_]:= x; (* Is this possible? *) f[x] (* x *) In other words, is it possible to stop ...
11
votes
1answer
224 views

How can I define symbols but not have them show up in the front end?

I have a huge set of packages with, arguably, far too many functions. Paring down the number of functions, while a good thing to do eventually, is something I just don't want to spend the time on ...
5
votes
1answer
123 views

Unique[] and special handling of symbols ending with a single dollar sign

Example Unique[x] generates a new symbol, with a name of the form x$nnn. If so then this is not correct: ...
4
votes
1answer
86 views

Verify that an expression can be evaluated

Suppose I have a string: str="sin(x)*25+exp(1.5*y)" I want to be able to evaluate it in Mathematica. I can do this, of course: ...
2
votes
2answers
154 views

Separating variables in an expression

Given a non-polynomial expression such as: expr = x z Sin[x] Sin[y] and that we know that the variables are: var = {x,y,z} ...
1
vote
1answer
97 views

Why %n need to use with care?

I am new to Mathematica and don't understand why %n need to use with care. Is there any problem if use it? I cannot find explanation in the book.
-1
votes
1answer
79 views

clear value from a bunch of symbols

I have a bunch of symbols which are collected as a list inside a variable within a bit of code e.g. a=1;b=2; par={a,b}; I want to clear the values of both ...
5
votes
0answers
43 views

List of symbols that do not work in console?

Symbols that do not work in the Wolfram Cloud have a nice "no cloud" icon. Is there something similar for symbols that don't work in the wolfram console? Or perhaps a full list of functions that do ...
7
votes
0answers
66 views

Dataset Crashes Information and Definition functions

Bug in 11.0.1 fixed in 11.1.0 Has anyone else noticed this odd function crash with Datasets. Try the following in a clean kernel. ...
0
votes
1answer
45 views

Handling large amount of pre-described computational work

I have a large document (around 200 pages) describing a certain line of computations. I want to implement those methods using Wolfram Language. Formulas contain functions and variables that are ...
1
vote
1answer
132 views

How can I prove the equations without KroneckerDelta or LeviCivitaTensor?

How can I prove the equations without KroneckerDelta or LeviCivitaTensor? These 729 equations: 81 equations
27
votes
4answers
2k views

How can I adaptively simplify a curved shape?

For the purposes of creating a publication-quality plot marker I wish to convert a font glyph into a simplified Polygon where points are taken adaptively according ...
30
votes
2answers
1k views

How to make Mathematica variables declarative instead of just-in-time?

Is there a way to have Mathematica at the notebook level (SetOptions[EvaluationNotebook[], CellContext -> Notebook]) only uses a set of declared variables in the ...
3
votes
0answers
54 views

Test which symbol of a list depend on some variable

Given a list of symbols, say {y[x],z[x],k} Is there a way to sort which depend on x and which don't ? Applied to the above list,...
3
votes
2answers
102 views

How to identify whether or not a function has a definition?

I have written a function that relies on functions from an external library that may for various reasons fail to load. I would like to test if the functions in the external library have been defined ...
3
votes
2answers
78 views

Mapping ValueQ over a list of symbols gives answer different from direct evaluation

If I start with a symbol q that I've assigned a value to, q = 0; and one, x, that I haven'...
3
votes
1answer
167 views

Evaluate an expression with variable values stored in the form “variable name” + val

Consider an expression exp = a^2 + b + c which has variables a, b, and ...
3
votes
1answer
105 views

Get the name of a time series while using Table

I saw a number of related questions to the one I'm about to post; they helped, but none of them solved my problem entirely. Get the name of a symbol passed to a function Obtaining the name of a ...
4
votes
3answers
163 views

How do I type the independence symbol in Mathematica?

I know this seems to be a really stupid question, but I can't find a way to type the independent symbol. I found how to write the \[UpTee] but it isn't the same. ...
1
vote
0answers
27 views

Names of Variables in an Array [duplicate]

Foo={1,2,3}; Bar={4,5,6}; Blech={Foo,Bar}; Is there some way to retrieve the name variable name "Foo" from Blech[[1]]?
2
votes
1answer
109 views

Is there any way to enumerate “variables made special by use in arguments”?

I want to create a way to enumerate teal color coded variables in my Manipulate function. Specifically, I would like the user to input a number so that my function ...
1
vote
1answer
75 views

Unique Replacement of Symbol

I have formular = a[0]*e[0] + a[0]*e[1] + b[1]*e[0] + c[0]*e[1] and I want to replace every e[_] into some unique symbol: ...
5
votes
1answer
267 views

need help to enter the orthogonal sign, the upside down T.

I have search on Google and never came across any idea how to enter this damn sign. would anyone give me some hint?
3
votes
0answers
97 views

Does Reduce have problems with greek symbols that lead to wrong results?

I call Reduce on the following simple system of inequalities ...
31
votes
3answers
688 views

Why does removing a function and defining it on the same line not work?

Why do the two pieces of code below yield rather different results? The only difference is that in the first one the function definition is in the same line as the ...
0
votes
1answer
110 views

Extract sublists automatically and name them

I have these 6 random walks of size 100 generated into a list: ...
8
votes
0answers
97 views

Unique[] problems

A fresh Mathematica session with $Version "11.0.1 for Microsoft Windows (64-bit) (September 20, 2016)" produces the following results. ...
1
vote
1answer
44 views

Solving for a function after replacing and substituting in an expression [duplicate]

I am trying to isolate $X(s)$ in the following expression: ...
3
votes
0answers
89 views

How do I reassign the ordering of symbols in a polynomial expression?

I have a big polynomial expression, like this: ...
2
votes
1answer
121 views

How to set a symbol indirectly?

I have a symbol, say x, whose calculated value is a 2nd symbol. How can I set the 2nd symbol to a given value? For example, say the value of x is one of the symbols a, b, or c. If it is a, I want to ...
12
votes
2answers
174 views

Bug: With[] pattern-variable renaming misses symbols within `Except`

Bug introduced in 10.1 and fixed in 11.1 Thank you for taking the time to send in this report. It does appear that pattern-variable renaming misses symbols within Except when using With. I will ...
1
vote
0answers
83 views

How to control variant of digits for a given font?

Is it possible to control style of digits for a given font? In the following example 2nd, 3rd and 4th lines print old style digits. How to get linear digits for these fonts? ...
1
vote
0answers
80 views

Why can't variables be set to named characters [closed]

Why can't variables be Set to named characters as shortcuts? eg a = \[UpArrow] Gives syntax error: ...
3
votes
1answer
102 views

How to replace the symbol n in DifferenceRoot

I'd like to employ another symbol (say alpha or k) instead of n in the following (type of) ...
0
votes
0answers
30 views

Pass list title as argument? [duplicate]

I have a function that works with a list and outputs it. Is it possible to also get the name of the list as an argument? Right now my code is ...
4
votes
1answer
160 views

How to make a custom function as inbuilt

I have a custom function like following: ...
1
vote
0answers
412 views

How to declare variables with plus/minus sign as subscript/superscript?

I am pretty new to mathematica, so please forgive me if I ask any stupid questions. I want to create a vector $a^{+}=[a^+_{k-2},a^+_{k-1},a^+_{k},a^+_{k+1},a^+_{k+2}]$ and then do some symbolic ...
2
votes
1answer
60 views

Define return values for a function that is not of type Boolean

I have a function with more than two possible return values. A simplified example is the following function that classifies vertices of a graph according to their degrees: ...
3
votes
1answer
514 views

Protected Variable Error with Workbench 3.0

I have Wolfram Workbench 3.0, build 78, with Mathematica 10.4 as the front end. I am using Windows 10. I am trying to run a simple test source code test.m: ...
1
vote
1answer
138 views

Make a glyph using the BezierCurve function

There are a lot of applications that you make a glyph from a scanned image. Mathematica does have fine tools to interpolate curves like the BezierCurve[] function. ...