We’re rewarding the question askers & reputations are being recalculated! Read more.

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
44
votes
5answers
3k views

How to create symbols from strings and set values for them?

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
87
votes
6answers
85k views

How do I clear all user defined symbols?

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?
28
votes
5answers
2k views

What are the requirements for a well behaved indexed variable? Subscript, ToExpression, Downvalue?

On writing this answer I needed to call a function, (NonlinearModelFit) with an unknown number of parameters. We have learned that we should not use ...
73
votes
2answers
7k views

Is there a way to separate variables between multiple notebooks?

I often correct homework by checking the calculations in Mathematica. Sometimes you would like to have two solutions open at once. However often defined symbols such as ...
25
votes
5answers
5k views

How to pass a symbol name to a function with any of the Hold attributes?

Given a function with the attribute HoldFirst, HoldAll or similar, and a variable, list, how ...
31
votes
5answers
3k views

How do I reassign canonical ordering of symbols?

I have a big polynomial that evaluates to: $$A^2 e^2 \phi ^- \phi ^++A e \phi ^- \phi ^+ c_{2 w} g_Z+\frac{1}{2} A e g h W^- \phi ^+ +\ll13\gg,$$ which is supposed to represent some terms in the ...
44
votes
1answer
2k views

Local variables in Module leak into the Global context

From the Mathematica documentation on Module: Module allows you to set up local variables with names that are local to the module. But after using ...
14
votes
1answer
7k views

How to create symbol whose name has subscript?

I can do Symbol["foobar"] to create a symbol foobar. How to create a symbol $\theta_1$? ...
14
votes
3answers
672 views
18
votes
3answers
377 views

How can I test properties of a symbol from the string name without the symbol completely evaluating

Suppose I have a few symbols, one of which has a value: {abc1, abc2 = 5, abc3}; I can use Names to get the list of names, as ...
17
votes
1answer
1k views

Get the name of a symbol passed to a function

I'm trying to get the name of a symbol passed to a function with this: f[x_] := {SymbolName[x], x} SetAttributes[f, HoldFirst] x = 5; f[x] But ...
40
votes
1answer
2k views

What is the story with Removed symbols?

The system function Remove evidently exists primarily to turn a fatal problem into an annoying one, by giving the user a (rather blunt) instrument with which to ...
8
votes
2answers
5k views

Generating a vector of dummy variables

So I'm the situation of needing analytical solutions to a family of equations of the form Ax=b, where A is an nxn matrix. I've written a function that does what I want, but I'm currently using a bit ...
50
votes
4answers
3k views

Is there an equivalent of MATLAB's Workspace window in Mathematica?

For example, in MATLAB, a panel is available where one can see straightaway which variables are used and their dimension sizes. Is such a feature available in Mathematica? I really find it hard to ...
16
votes
2answers
3k views

How to unload automatically loaded packages?

I know that this has been discussed here (How do I clear all user defined symbols?), but my case is somewhat different. How does one unload packages during runtime that were loaded with the start of ...
11
votes
2answers
2k views

Why did Mathematica choose brackets for function arguments over parentheses?

This is a non-technical question. I'm just curious why Mathematica breaks the convention that parentheses are widely used for function arguments. What's the advantage of ...
13
votes
1answer
365 views

Is garbage collection broken in version 10.0.0?

Bug introduced in 10.0.0 and fixed in 10.0.1 In version 10.0.0 under Windows I am observing the following behavior: ...
3
votes
2answers
1k views

How to define a vector with automatically added symbolic elements with subscripts

I want to define a vector lets say k containing elements Symbolize[Subscript[k, 1]], k2, k3 ... etc. When I define lets say k4 . I want the symbol automatically added to vector k. Something like ...
16
votes
3answers
866 views

Defining symbol shortcuts in the Front End

I was wondering (because I could not find any documentation on this) if it is possible to do shorthand abbreviations for domains or could one define them? E.g. In[1]:= Element[p,Complexes] Out[1]...
11
votes
1answer
219 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 ...
11
votes
3answers
555 views

How to set a TraditionalForm output for a symbol

How do I set a TraditionalForm output for a particular symbol/function? In particular I would like my user-defined symbol ...
12
votes
3answers
2k views

Telling mathematica to output * instead of space for multiplication, so I can copy as plain text

I am trying to get some symbolic expressions in Mathematica which I would like to paste into my C/MATLAB codes. This can be accomplished nicely by selecting the expression and right-clicking to ...
6
votes
1answer
780 views

Using the symbol I for electrical current [duplicate]

I would like to use the I as a symbol for the electrical current. How can I redefine it, so it is not interpreted as the imaginary unity?
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 ...
32
votes
2answers
2k views

How can I use the Klingon alphabet symbols?

Note: This functionality is presently missing. See: How to add named characters to Mathematica 10? Mathematica apparently supports the Klingon alphabet: ...
19
votes
2answers
840 views

Automated testing for compatibility with older Mathematica versions

I have several packages which I actively develop and maintain. I try to stay up to date with new releases of Mathematica and usually update within a couple of months of a new version coming out. As a ...
11
votes
3answers
972 views

List of Mathematica glyphs

Context I am using Mathematica to create live documents - documents that are both interactive and show mathematical derivations. Now, I'm aware that there are certain symbols that are available via: ...
33
votes
5answers
2k views

Does every Symbol in Mathematica induce a monad?

From my question about types in Mathematica, I assume that every Symbol in Mathematica is a type if it appears as a Head of some ...
31
votes
3answers
683 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 ...
15
votes
1answer
485 views

Is the sharing of variables in Module/Block within Compile documented behavior?

Today I noticed something, I think for the first time. When used inside Compile variable values within Module (and ...
9
votes
1answer
890 views

How can I replace the Greek symbols in an expression with their plain text names?

Suppose I have an expression with Greek symbols in it. How would I convert that expression to another expression where the Greek symbols have been replaces with their names in plain text? I've ...
7
votes
2answers
484 views

TeXForm and Symbolize

I would like to use TeXForm to generate LaTeX output as usual. However, I use subscripted variables such as c_t. Unfortunately, ...
7
votes
2answers
306 views

Not FullDefinition for Save. MachineID not Protected?

Is there a way to set what symbols's definitions I do not want to store? Consider the following code: ...
3
votes
2answers
202 views

How to open directly the help/reference window from a notebook

I'm used to do ??symbol when I want the reference for a given symbol, then I click on the >> arrows to open the help window. Would it be possible to ...
5
votes
2answers
377 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 ...
4
votes
2answers
1k views

Using Greek letters with subscripts as symbols

I'd like to use Subscript[ϕ, 1] as a function name: Subscript[ϕ, 1][x_] = C1 + C2*x + C3*Exp[α*x] + C4*Exp[-α*x] But as I use ...
8
votes
1answer
383 views

How to convert formal symbols to standard ones in an expression?

Mathematica generates an expression sometimes using \[Formal] symbols. This is causing a problem with the TeXForm code generated ...
5
votes
0answers
281 views

Organizing Wolfram language symbols with Entity

Here's a word cloud tally of the ~5k System names split at camel humps, with the long tail cropped. What resources are available to organize these terms using the new ...
4
votes
1answer
92 views

? (Definition) versus ?? (Information)

What is the difference between ? Definition and ?? ...
3
votes
0answers
285 views

Symbol with Subscript but no quotes in it!

If I use the following function to define me a fancy subscript: ...
32
votes
3answers
13k views

Guidelines on giving readable names to variables [closed]

I know that one cannot use underscore to a variable name, like degree_of_The_First_Polynomial. But for a long variable name, it ...
27
votes
1answer
495 views

Are greek symbols causing different evaluation?

I've updated today to Mathematica 9.0.1.0 from version 8 and found something that absolutely confuses me. Let us define a piecewise function: ...
15
votes
1answer
222 views

All value types for a symbol?

Robby Villegas here shows a nice way to see all the types associated with a symbol. He sets a symbol, valueTypes, to an explicit list of the values types in ...
9
votes
2answers
295 views

Naming convention for symbols exported from package

I know this is a little opinion based, but so is Mathematica style guide and similar topics. The issue is important so I think this topic will be beneficial for future visitors. Q: So ...
20
votes
6answers
4k views

How to clear all variables except one?

I have a lot of variables: $a,b,c,d, \ldots $ I want to clear the values of all of them except $b$. It's really lengthy to write Clear[a]; Clear[c]; ... Is ...
9
votes
1answer
1k views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
18
votes
4answers
1k views

How can I randomly generate a unique, unused symbol?

In a previous question on collecting terms for a multivariable polynomial, I answered with a solution that required a unused symbol to be used for a temporary substitution and back substitution. It ...
13
votes
1answer
548 views

How can I obtain a complete list of the kinds of atomic expressions in the Wolfram Language using only the language itself?

I mean, Wolfram is a language--it's words are infinitely combinable. According to answers to my last question, the only way I can find out if an expression is atomic is actually use the expression. ...
7
votes
1answer
948 views

Using external variable as a variable inside WhenEvent & NDSolve

I'm trying to use the new WhenEvent functionality of NDSolve in Mathematica 9, in order to perform an action when a variable in the system reaches a certain value. I would like this variable to come ...
7
votes
2answers
291 views

Delete contexts from a string representation of a symbol

I want to delete the string representing the context of a symbol. For info I need such a functionality in my ShowIt function defined here I'd like to know how I ...