Linked Questions

4 votes
2 answers
7k views

How do I clear all variables with subscripts? [duplicate]

Possible Duplicate: Clear complains that a variable is not a symbol or a string? Clear["Global*"]` Works for most variables, however if i do something like $ \...
user160917's user avatar
1 vote
0 answers
4k views

How to assign (and retrieve) variables with subscripts? [duplicate]

I like to give subscripts to my variable names when the variables are related. I.e., Subscript[r, i] = 3 3 A problem arises when I later assign ...
jlconlin's user avatar
  • 247
2 votes
3 answers
417 views

Why does Clear[] not work on subscripted variables? [duplicate]

Where is the problem? ...
RF_1's user avatar
  • 692
0 votes
1 answer
969 views

Can't clear variables with subscripts [duplicate]

ClearAll["Global`*"] doesn't clear subscripted variables. It won't clear these variables for example. ...
John's user avatar
  • 1
0 votes
1 answer
358 views

How to clear this variable [duplicate]

I can not clear this variable. How to clear?
Takemi's user avatar
  • 1
1 vote
0 answers
290 views

How to clear all subscripted variables? [duplicate]

I have the following variable: Subscript[n, 0 ] = 12 (\[Sigma] L^2)/(e h^2) If I now do: ClearAll["Global`*"] And then ...
james's user avatar
  • 3,093
1 vote
0 answers
59 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 ...
Scott's user avatar
  • 31
221 votes
2 answers
14k views

What is the distinction between DownValues, UpValues, SubValues, and OwnValues?

When reading through the documentation, you often encounter the phrases DownValues, UpValues, ...
rcollyer's user avatar
  • 34.1k
100 votes
5 answers
10k views

Using the Mathematica front-end efficiently for editing notebooks

Background: I have used Vim for 15+ years. There is a certain "one"-ness with the editor one achieves. Emacs users also experience this. Notepad users do not. My current interaction with the ...
user avatar
55 votes
2 answers
31k views

Can we use letter with a subscript as a variable in Mathematica?

I tried Subscript[a, 0] = 1 (* 1 *) Clear[Subscript[a, 0]] ...
Osiris Xu's user avatar
  • 1,029
24 votes
2 answers
8k views

Error entering equation in DSolve

I entered a command incorrectly as follows: DSolve[{y'[x]=y[x]},y[x],x] I am now experiencing: ...
David's user avatar
  • 15k
7 votes
3 answers
4k views

How to Clear variables with apostrophe?

An apostrophe ' is often used when we want to distinguish two variables. For example, if we already have a variable t and we may ...
matheorem's user avatar
  • 17.4k
6 votes
6 answers
8k views

bar and hat only apply to certain letters

(I'm navigated from stackoverflow.com where I asked almost the same question) I'm a beginner in Mathematica. Like shown in the image below, I'm trying to put hat ...
IsaacS's user avatar
  • 583
16 votes
1 answer
629 views

Selectively clear DownValues

How can I clear a subset of a symbol's DownValues ? For example, suppose I have created some DownValues for $f$ like this: ...
Simon Woods's user avatar
  • 85.4k
3 votes
4 answers
247 views

Pack Solve results into a vector

I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace: ...
Christian Ivicevic's user avatar
3 votes
2 answers
2k 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 ...
s.s.o's user avatar
  • 4,577
4 votes
2 answers
2k 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 ...
Daniel's user avatar
  • 41
4 votes
1 answer
669 views

How to "clear" the downvalues of a subscripted variable?

I have a function that sets certain subscripts of the symbol aa as in the following example: ...
matrixbud's user avatar
  • 445
6 votes
1 answer
2k views

Best way to write an equation with subscripts and superscripts

This post is not about a specific Mathematica problem but about to develop the best way to enter mathematical equations with subscripts and superscripts. I have a ...
Tugrul Temel's user avatar
  • 6,409
3 votes
2 answers
458 views

How to clear variables in a manipulate without enabling dynamic content?

I have a series of variables that will plot the number of straight segments along a curve, thanks to the help from here on one of my previous questions. I can create a working Manipulate command from ...
ASBO Allstar's user avatar
  • 1,106
3 votes
3 answers
145 views

Can I put subscripted parameter values into a package?

When defining packages, can I put parameter values alone or along with functions into a package in subscripted form? ...
novice's user avatar
  • 2,345
0 votes
0 answers
175 views

>100 GB of memory used by Reduce. Am I doing something wrong?

Newish to Mathematica here. I'm running some code to compute regions of the parameter space where the covariance between innovations is positive or negative. On my Windows PC, it's been running for ...
hipHopMetropolisHastings's user avatar
0 votes
1 answer
79 views

Using Subscripted Notation without Introducing new identifier

I would like to use subscripted notation such as $\sigma_x$ as identifiers for use as variables. In this example I am using the Pauli Matrices so that I would use notation such as: $$ \sigma_x = \{\{...
K7PEH's user avatar
  • 619
2 votes
0 answers
94 views

Using ForAll in Maximize to define a bunch of conditions [closed]

I'm trying to do something very straight forward. The following maximization works: ...
Jabber's user avatar
  • 21
0 votes
0 answers
76 views

Using sub-scripted variables in functions

Is it possible to use subscripts in Mathematica functions, for example f[Subscript[x, a] _] := x^2 However this doesn't seem to work, is there a way to allow ...
user27119's user avatar
  • 2,530