Skip to main content

Questions tagged [built-in-symbols]

Questions related to handling built-in symbols and functions, for example why they behave a certain (possibly unexpected) way.

Filter by
Sorted by
Tagged with
3 votes
1 answer
419 views

Plot fails to plot. What am I doing wrong?

The below code executes. If I uncomment the Plot, it runs for a while and outputs nothing, not even the Mean and Variance. ...
Jonathan Venezian's user avatar
3 votes
0 answers
39 views

Is this list of Formal Symbols complete? Which versions have unprotected Formal Symbols?

Formal Symbols are protected against being assigned values, making them handy for avoiding name collisions for things like fit parameters and pattern matching. Because formal symbols (and others) like ...
Tapiocaweasel's user avatar
1 vote
0 answers
28 views

Can we find (and understand) the ordering functions used in the various output forms?

Can we use (and perhaps even understand) the sorting functions used in the various output forms (such as OutputForm, TraditionalForm, TeXForm, etc...). This is motivated by the fact that I would like ...
Kvothe's user avatar
  • 4,491
2 votes
1 answer
90 views

Distinguish .nb that has been saved from new .nb

There may be many ways to distinguish .nb that has been saved from new .nb I found that in NotebookInformation[] may be useful. ...
imida k's user avatar
  • 4,295
1 vote
3 answers
112 views

A variable with a^2=0 [closed]

I want to do something simple. I want to define a variable such that a^2=0, so that say: Exp(a) = 1+a And any other function automatically f(a)=1+f'(0)a. Is it possible to do that in Mathematica?
user1505725's user avatar
2 votes
0 answers
32 views

What are the (potential) uses of those utility functions in the context GroupTheory`Tools`?

This old answer briefly described the usages of GroupTheory`Tools`Multisets, GroupTheory`Tools`MultiSubsets, ...
user688486's user avatar
1 vote
1 answer
128 views

Can the Debye functions be implemented using built-in functions?

It is claimed in the comments here that the Debye functions can be implemented using built-in special functions. This is clearly true for some Debye functions, e.g., $D_n^{(1)}(x)$ for $n = 1, 2, 3$ (...
WillG's user avatar
  • 960
3 votes
1 answer
114 views

Factor gives non-factorized result

The Factor built-in function is usually idempotent, namely applying it twice gives the same result. However, in the following example it is not. Is that expected? ...
Bruno Le Floch's user avatar
0 votes
0 answers
44 views

Palette that gets single keystroke as input

I could find many examples of user-made Palette with many buttons in it. And drawing-tools Palette is not user-made, but it accepts a single keystroke as input. (In ...
imida k's user avatar
  • 4,295
1 vote
0 answers
40 views

"ParticleData[] " command $Failed

I am using Mathematica version 13.2. I am trying to use Mathematica's "ParticleData" command to get the information about the particles directly from PDG. But, whenever I am trying to ...
Lipika's user avatar
  • 11
0 votes
0 answers
120 views

How to use Switch for more than one switchable arguments (in a compilable way)?

Consider some example of usage of the function Switch: ...
John Taylor's user avatar
  • 5,827
7 votes
1 answer
132 views

Get All Discrete Univariate Distributions with Symbolic Parameters

I am trying to get all Discrete Univariate Distributions with symbolic arguments from any place in Wolfram Language system. For example this guide: http://reference.wolfram.com/language/guide/...
Vitaliy Kaurov's user avatar
3 votes
1 answer
225 views

Test whether an expression contains a particular pattern

How to test whether an expression contains a particular pattern ? I made a function for myself that tests whether an expression contains Plus or not. ...
imida k's user avatar
  • 4,295
3 votes
1 answer
81 views

Basic question Sort criteria

Can you explain the following codes? (output of codes) I know that there is the default ordering for any expression in Mathematica and Sort uses the default ...
imida k's user avatar
  • 4,295
1 vote
1 answer
97 views

Why do some functions, or at least, PowersRepresentations, run far faster on subsequent calls? What determines this behaviour?

Say I run the following: PowersRepresentations[4782969,4,2] and it takes about 2 minutes. If I call it again it takes only about 0.0005 seconds. What determines ...
1729taxi's user avatar
  • 777
2 votes
1 answer
85 views

Defining function for decimal value k[0.5+0.5]

k[1 + 1] = 2; k[1 + 0.5] = 1.5; k[0.5 + 0.5] = 1; {k[2], k[1.5], k[1]} // TableForm 2 1.5 k[1] Can you explain this phenomenon? I think the output should be ...
imida k's user avatar
  • 4,295
8 votes
1 answer
349 views

What is MergeDifferences?

My version is 13.2.0 for Mac OS X ARM (64-bit) (November 18, 2022). The symbol MergeDifferences appears in the auto-completion ...
Lacia's user avatar
  • 2,293
12 votes
2 answers
349 views

How can I create a shortcut to convert "normal Symbol" to Formal Symbol?

I'd like to create a shortcut to convert a selected symbol, say \[Delta], into its rough equivalent formal symbol (i.e., ...
Craig Carter's user avatar
  • 4,510
1 vote
1 answer
124 views

Need a few built-in Symbols (functions) whose Options are a mix of Rule-s and DelayedRule-s [closed]

This is for examples in documentation I'm writing for a ResourceFunction["PrettyOptions"] (look for it soon) that is close to completion. Asking for most ...
Jules Manson's user avatar
  • 2,467
2 votes
1 answer
79 views

`SequencePosition` doing unnecessary work

SequencePosition returns only the first sequence in a list that matches a given pattern with SequencePosition[list,pattern,1] ...
Diffycue's user avatar
  • 1,844
2 votes
2 answers
116 views

Write an expression that queries all of MMA to find the top M Symbols with the most Options or M Symbols having N Options?

I apologize, but I'm way over my pay-grade on this one, so I don't have any code to share that needs correcting. That is because I really don't know how to start this. I feel like this has a very easy ...
Jules Manson's user avatar
  • 2,467
3 votes
0 answers
62 views

ContinuousMarkovProcess built-in function

Is the built-in function ContinuousMarkovProcess in Mathematica is the well-known Gillespie algorithm?
David's user avatar
  • 51
2 votes
1 answer
774 views

How to copy infinity symbol as ∞ and not as \[Infinity]

FromCharacterCode[8734] (* ∞ *) No matter how I copy whether as plaintext or input text or whether it is inside string like <...
azerbajdzan's user avatar
  • 18.9k
0 votes
1 answer
117 views

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

I have the following list of indexed variable names: list = {x1,x2,x3,x4}; I would like to build a list of formal symbols from the above list, i.e. ...
E. Chan-López's user avatar
9 votes
1 answer
315 views

How to restore the compile function from FunctionCompileExportByteArray

We can compile a function into a ByteArray object: ...
yode's user avatar
  • 26.8k
1 vote
1 answer
83 views

Why does my simple string function fail to grab the only element in a List?

The idea is to normalize a string before processing it to extract information from it. Strings may come with embedded outer brackets which are easily stripped or as elements of a true list. This is ...
Jules Manson's user avatar
  • 2,467
1 vote
1 answer
89 views

Ensure that Options for built-in symbols are the original defaults

I often create symbols (no args) or functions (with args) in which common options (and styles) are set in body and unique opts within args for managing multiple calls to built-in functions. these spit ...
Jules Manson's user avatar
  • 2,467
4 votes
0 answers
42 views

Sequence in superscript

The code DisplayForm@SuperscriptBox[a,b,c] makes a invalid box. It still renders like $a^b$, but it's red with an error message (as it should be). That being said,...
Adam's user avatar
  • 3,956
5 votes
1 answer
156 views

Evaluating PlusMinus to 2 decimal answers

How do I evaluate and expand an expression containing PlusMinus such that: N[PlusMinus[1, 1]] returns 2, 0 I'm stuck at ...
Freddy Mcloughlan's user avatar
0 votes
0 answers
70 views

Packed/Unpacked array - what object/like 0 or 1?/how to check/ [duplicate]

In Mathematica, there is a concept called packed array. ...
imida k's user avatar
  • 4,295
5 votes
5 answers
263 views

How to get the action diagram when the group act on a set?

I previously thought the orbital map would achieve this, but as the current answer or discuss in the comment. I realized that was wrong. And the Close behavior advice tells me "Needs details or ...
yode's user avatar
  • 26.8k
1 vote
2 answers
158 views

Two questions about `Infinity` [closed]

These are 2 small questions about Infinity. They are not related each other. Q1) ...
imida k's user avatar
  • 4,295
7 votes
7 answers
690 views

Grouping consecutive elements at specified positions

Let L1={1,2,4,6,8,9,10,14,15,17,21,22,72,76,80,96,106,116,117} Question1) Group from 10-th to 14-th elements in L1. So that the ...
imida k's user avatar
  • 4,295
3 votes
1 answer
128 views

Extracting list structure from nested list

Can we construct a function f, g in mathematica such that For any list L, g[Flatten[L],f[L]] ...
imida k's user avatar
  • 4,295
1 vote
2 answers
77 views

Theoretical Timing possible? (not changes for each evaluation)

Is there a method to measure theoretic time load (hope +theoretic memory load) of an evaluation? They should not change - always generate same value after pressing Enter key(=evaluation). Hope they ...
imida k's user avatar
  • 4,295
9 votes
4 answers
471 views

Construct a pure function containing built-in 'Sequence'

I guessed the output for (Sequence[#, 7]&)[3] should be Sequence[3,7] But my guess was wrong. See the screenshot: And I ...
imida k's user avatar
  • 4,295
2 votes
1 answer
358 views

Using < or <= make different results when sort

...
imida k's user avatar
  • 4,295
1 vote
1 answer
362 views

The square of Abs of a complex number

We all know that 4^2 + 22^2 = 500 Is there a natural way to generates 500 from the complex number ...
imida k's user avatar
  • 4,295
0 votes
0 answers
85 views

Calculate the "intersection" for the given case?

Consider the following task: There are two cross-sections: the first one is located in the $yz$ plane (the case 1), and the second one is in the $xy$ plane (the case 2). In the spherical coordinate ...
John Taylor's user avatar
  • 5,827
6 votes
1 answer
153 views

What is the purpose of StrokeForm?

Symbol System`StrokeForm is present already in Mathematica version 8 (but not in version 5.2). Currently, it is used in built-in themes, for example: ...
Alexey Popkov's user avatar
0 votes
1 answer
71 views

Using the symbol of the system of equations [duplicate]

Part 1 I'd like to know how to use the symbol of system of equations (left curly braces). I tried the following code: Part 2 How can I add a third equation?
Gennaro Arguzzi's user avatar
1 vote
1 answer
1k views

Symbol of system of equations

I'm wondering if there is a way to use the symbol (the left curly bracket) of a system of equations. So far I found only the following "symbol": I need to remove the two conditions. EDIT2: ...
Gennaro Arguzzi's user avatar
2 votes
1 answer
87 views

Is there a comprehensive list of most common or most important native Message-s (w/tags) for errors and Failed?

Yes I understand how to use Messages[symbol] but that doesn't help much. I have no idea which important ones I may have missed in my search or even how many exist. ...
Jules Manson's user avatar
  • 2,467
1 vote
1 answer
78 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.
Anixx's user avatar
  • 3,585
1 vote
0 answers
208 views

Separate colours of an image

Since LAB colour space is based on opponent color theory, an image in 'LABColor' is made up of red/green, yellow blue separations. I am trying to separate an image into its distinct colour components (...
martin's user avatar
  • 8,728
0 votes
2 answers
131 views

NMaximize - global maximum fail - How to?

Problem : Let x,y,z be non-negative real number whose sum is 1. Find maximum of 0.2x + 0.2y + x^2*z + y*z^2 What I did first was reducing variable. ...
imida k's user avatar
  • 4,295
4 votes
1 answer
352 views

Largest k such that p^k divides n

(Here all variables are integer.) Is there a built-in function f[n,p] such that f[n,p] = largest k such that p^k divides n For ...
imida k's user avatar
  • 4,295
2 votes
1 answer
125 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. ...
user3257842's user avatar
3 votes
2 answers
159 views

Built-in functions on the LHS won't pattern-match

I have this pattern-matching problem: F[X_,myminus[X_]]:=0 F[1,myminus[1]] Works. ...
Hauke Reddmann's user avatar
7 votes
4 answers
436 views

AnyTrue is too good (compared to MemberQ)

Let L be a list of integers, and ⓝ denote an explicit integer. I've thought the most natural way to tell whether ⓝ belongs to L is In[1] MemberQ[L, ⓝ] But there ...
imida k's user avatar
  • 4,295

1
2 3 4 5