Questions tagged [core-language]

Questions on the basic structure of the Mathematica language (Wolfram language) including atomic data types, syntax etc

Filter by
Sorted by
Tagged with
5 votes
1 answer
76 views

FindIsomers produces disconnected fragments

I was playing around with FindIsomers and got this strange result, FindIsomers[Molecule["butane"]] output This seems unexpected in the sense that you ...
  • 623
0 votes
0 answers
107 views

Codewars and Mathematica

I looked up the Wolfram Language on Codewars as the site is great to improve coding. WL is not among the listed languages (I checked the beta versions as well). I assume this is because the language ...
  • 1,286
19 votes
1 answer
744 views

When did this global rules change happen in Mathematica? Is this change documented?

In this Wolfram talk video titled "Professor Richard J. Gaylord's Wolfram Language Fundamentals Part Two" he shows at time 36:45 the following Where there are two definitions for ...
  • 116k
4 votes
2 answers
201 views

What should mapping over a number or symbol produce?

I expected it to be an error (i.e., produce an error message), but Map[f,num] is num. Why is this the correct behavior? If it is ...
  • 12.7k
4 votes
0 answers
68 views

What are some basic references for learning "box language" and further mathematica language customization techniques? [duplicate]

I'd like to be able to understand and write mathematica code that is able to customize in some way the output of mathematica in notebooks, for example. I believe I need to learn the so called ...
  • 41
3 votes
1 answer
168 views

BUG - Different Cloud vs. Desktop Return behavior in V13.1 [duplicate]

After install V13.1 one of my scripts get broke in my Mac. Here is the bug: Module[{}, Return[1]; 2] Return[1] When I tested ...
  • 25.6k
11 votes
2 answers
449 views

How can I create an atomic head or treat some head as atomic during Map?

For example, Map[g, {0, {h[1, 2, 3]}}, {-1}] gives {g[0], {h[g[1], g[2], g[3]]}} I want a ...
  • 16.4k
0 votes
0 answers
47 views

Evaluation involving complex conjugates

I was trying to write an expression involving Conjugate. To create a minimal example, however, I have reduced it down to these expressions. ...
  • 19.2k
0 votes
0 answers
40 views

Extracting function domain from a finite set of assignments

Suppose we define a function through a finite collection of equalities, e.g., f[1] = 1; f[26] = 321 and so on. We can extract the set of output values by running <...
  • 605
1 vote
1 answer
43 views

How to define the `Length` property of some expensive function (UpValues, DownValues and order of execution confusion)

I want to define the Length property for some function that is computationally expensive and returns a list. So if the function is ...
  • 2,791
5 votes
1 answer
208 views

Is K is a function? [duplicate]

Some of the capitalized single letters are functions. Starting a fresh kernel and typing in the 24 capital letters, the following letters turn black since they are special functions, ...
  • 1,967
3 votes
0 answers
68 views

Problem with Mathematica Relationship Building

When I enter the following to get Mathematica to open my pod door I get Could someone try and replicate this? Also, my name is not Dave and I throw my own error... ...
  • 6,978
3 votes
1 answer
118 views

Differences between minimization functions?

There's more than 20 functions having to do with minimization ...
  • 3,099
2 votes
3 answers
199 views

How to map integration and multiplication to a serie?

*For further study of series, they can be put into a different form. Normal[Series[1/(1 - x), {x, 0, 10}]] This serie 1/(1-x) = 1 + x + ... ,must be first ...
  • 659
0 votes
0 answers
38 views

What is OLEData? VectorGlyphData?

System`OLEData is a symbol, and I only see it referenced in syntax highlighting lists online. Same for System`VectorGlyphData. ...
  • 3,099
0 votes
0 answers
75 views

How can I add such objects as three dots and plus

What kind of objects do the red arrows point to in the following images? Things like the "Three dots plus". What is the name of this object and how do I insert it? And also the second ...
0 votes
0 answers
37 views

Adding new functions globally [duplicate]

Perhaps this is bad practice, but I'm wondering if it's possible to create my own Mathematica functions and make them equivalent to core functions (i.e they are available in any notebook/kernel ...
0 votes
1 answer
64 views

Applying pure function to an association, why the square brackets? [closed]

I'm studying the wolfram guide and I'm trying to figure out why the square brackets on the right side: ...
  • 518
4 votes
1 answer
90 views

Creating a Graph of related entities with the data from Wikidata

I've a list of Entities from Wikidata ...
  • 518
5 votes
1 answer
135 views

How can I remove First[{}] from the output list of a function?

Consider: listOfKeys = {"Ambientalismo", "Anoressia"}; list2 = First /@ (WikidataSearch /@ listOfKeys) I've tried ...
  • 518
0 votes
1 answer
86 views

How to get a specific element from a list {a, b, c, d}? [closed]

For example, I have x ={11,12,13,14}, how do I get the element staying at the third place, that is, 13?
0 votes
1 answer
48 views

Program works, but then fails when I write it inside Module [duplicate]

I'm new to Wolfram Language; I'm trying to get used to it by writing a bunch of code and programs, being one of them the algorithm for the bisection method. When I write the algorithm outside of a ...
6 votes
3 answers
1k views

Can someone tell me what's wrong with this nested IF? [duplicate]

I have written a very simple nested If as follows ...
  • 1,099
1 vote
0 answers
53 views

Outer vs Tuples, what's the meaning of this sentence from the Wolfram ref? [closed]

Results from Outer involve extra sublists: ...
  • 518
0 votes
1 answer
44 views

Distribute an operation on the cartesian product of two sets

I've been trying some different approach but all are not working: I've got 2 polls, the first with 2 options (and 2 list of people which voted each option), the second with 3 options (and 3 list of ...
  • 518
18 votes
3 answers
508 views

Difference between HashTable datastructure and Association datastructure

Is there a difference in the runtimes between CreateDataStructure["HashTable"] and <||> in terms of inserting, ...
  • 558
0 votes
0 answers
63 views

Is SetDelayed creating Functions?

I was trying to create a named function using a short syntax (I mean avoid writing Function[]). I thought SetDelayed was the short for Function[], but then I had some issues and realized that maybe #x ...
  • 518
0 votes
1 answer
60 views

What's the meaning of TypeSystem`Atom and TypeSystem`Vector?

SemanticImport is probably failing to import the data. In fact the log message is transformed into this weird entity. Dataset[List["Error calling Sogei service http://lb-ven-onl-psqf.winco.local/...
  • 518
4 votes
1 answer
75 views

How can default valued be added in a Query?

I'm not understanding the the default values are not used to produced a length of 0 in the following example. What is the right way to add default values during a query? ...
  • 12.7k
2 votes
1 answer
89 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. ...
4 votes
1 answer
93 views

Making a rule that only applies when the expression is NOT an argument?

I know we can make rules of the kind: magic/:f_[x___,magic[a_],y___]:=f[x,arg[a],y] This will replace magic[a] by ...
-1 votes
1 answer
343 views

Keywords for the Wolfram Language [closed]

For a programming language, certain keywords are reserved; i.e., these tokens can't be used in any other context while programming in that particular language. Here is a list of C language keywords ...
  • 19.2k
3 votes
1 answer
116 views

Why do these two calls to Apply return different results?

In the following example, why do these two calls to Apply return different results? ...
  • 9,505
4 votes
1 answer
124 views

Alternatives in pure function construction

When I declare a function f in the following form: f[a|b] := 1 then I can use it like: ...
3 votes
1 answer
44 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 ...
0 votes
1 answer
55 views

Debugging code with Plot function. Full details

This is some code: The first plot (with the f[x,3]) gives me a graph. The second plot (with the 'numerical' form of f[x,3] given) does give me a plot How can I fix this so that the first line gives me ...
  • 203
11 votes
1 answer
339 views

What is the relationship between the Wolfram executables? Where is this documented?

The relatively new wolframscript now accompanies the traditional math and wolfram binaries. ...
  • 12.7k
3 votes
3 answers
138 views

How to swap SetDelayed expressions?

Suppose, there are two delayed expressions D1:= RandomVariate[UniformDistribution[{-1, 0}]]; D2:= RandomVariate[ UniformDistribution[{0, 1}]]; ...
1 vote
2 answers
90 views

What are the limitations of RecurrenceTable?

Background Consider a recurrence relationship defined in terms of the following recursive functions (which works correctly): ...
3 votes
1 answer
125 views

Conditional Output of Solve as a piecewise function

I am solving a set of equations, and Solve gives me (as expected) conditional assignment rules. Now I would like to define a piecewise function with that output, and use both the solutions and the ...
  • 117
2 votes
1 answer
44 views

alternative approaches to selecting elements from two vectors conditional on a third

The following will convey the idea: build a new vector based on an existing condition (boolean) vector. For simplicity, I'll build the conditioning vector (cond) in ...
  • 12.7k
1 vote
1 answer
59 views

Assiging Plot Range to Variables Works For X but Not Theta

Observe the following Mathematica code: ...
  • 591
0 votes
2 answers
85 views

Create list of functions, domains, and iterate over (compare to Python code)

In Mathematica, I want to do a mass export of many different animated plots of specific functions with different domains. Because I don't necessarily want the plots to always have exactly the same ...
  • 591
1 vote
1 answer
32 views

Substitute a function

In the following code, I'm trying to substitute Sin[x] for f[x]. What's the right way to do it so that f'[x] gets replaced with <...
  • 1,446
0 votes
0 answers
90 views

What is the best way to remove dataset rows with missing values?

Consider a rectangular dataset produced by SemanticImport from a CSV file where the first row has the headers. Some values are Missing. I want to delete all the ...
  • 12.7k
1 vote
0 answers
71 views

Intervals v.s. Domains: when to use which and why?

or: How to use Interval correctly? Mathematica provides these constructs for various symbolic deductions tasks. Among those constructs are symbolic number sets ...
  • 678
0 votes
1 answer
72 views

Strange little bug: Simple real number replaced by Times[0.805`, \.00] [closed]

I had a bug in my code which I tracked down to the simple number 0.805. So I looked at the FullForm of this number and I got Times[0.805`, \.00] It isn't a big ...
  • 285
1 vote
0 answers
161 views

Converting negative value to zero [closed]

I would like to convert the negative outcome of $r_2$ to zero. I have used the following code, but it still gives me a negative value. Is there any option to turn the negative outcome directly to ...
  • 113
22 votes
1 answer
468 views

What's the difference between these 2 associations?

I have 2 associations similar to these simplified ones: ...
  • 19.5k
2 votes
0 answers
66 views

Should I redefine 0^0 [duplicate]

I've found some times, while playing with combinatorics, that Mathematica can't calculate some functions because $0^0$ is not defined as $1$. (I know that some people think that $0^0$ should be left ...
  • 413

1
2 3 4 5
11