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
3 votes
1 answer
78 views

Extremely slow import of mx files with Molecule objects [closed]

Version: 13.0.1 on Linux Hello, I recently found a collection of 39,361 SMILES strings that I converted to Molecule format with Mathematica. I then exported the resulting list of Molecule objects into ...
user avatar
  • 483
0 votes
0 answers
46 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. ...
user avatar
  • 14.4k
0 votes
0 answers
36 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 <...
user avatar
  • 595
1 vote
1 answer
41 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 ...
user avatar
  • 2,791
4 votes
1 answer
156 views

Is K is a function? [closed]

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, ...
user avatar
  • 1,815
3 votes
0 answers
64 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... ...
user avatar
  • 6,878
1 vote
0 answers
43 views

Molecule fingerprint MorganConnectivity

I am looking for a way to calculate the MorganConnectivity finger print for molecule object in Mathematica. v12.1 seemed to have an undocumented function MoleculeFingerprint ...
user avatar
  • 483
3 votes
1 answer
103 views

Differences between minimization functions?

There's more than 20 functions having to do with minimization ...
user avatar
  • 2,628
2 votes
3 answers
186 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 ...
user avatar
  • 649
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. ...
user avatar
  • 2,628
0 votes
0 answers
63 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 ...
user avatar
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 ...
user avatar
0 votes
1 answer
62 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: ...
user avatar
  • 518
4 votes
1 answer
79 views

Creating a Graph of related entities with the data from Wikidata

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

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

Consider: listOfKeys = {"Ambientalismo", "Anoressia"}; list2 = First /@ (WikidataSearch /@ listOfKeys) I've tried ...
user avatar
  • 518
0 votes
1 answer
56 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?
user avatar
0 votes
1 answer
45 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 ...
user avatar
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 ...
user avatar
  • 1,047
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: ...
user avatar
  • 518
0 votes
1 answer
41 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 ...
user avatar
  • 518
18 votes
3 answers
487 views

Difference between HashTable datastructure and Association datastructure

Is there a difference in the runtimes between CreateDataStructure["HashTable"] and <||> in terms of inserting, ...
user avatar
  • 558
0 votes
0 answers
61 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 ...
user avatar
  • 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/...
user avatar
  • 518
4 votes
1 answer
73 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? ...
user avatar
  • 12.3k
2 votes
1 answer
88 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. ...
user avatar
4 votes
1 answer
89 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 ...
user avatar
-1 votes
1 answer
293 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 ...
user avatar
  • 14.4k
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? ...
user avatar
  • 9,415
4 votes
1 answer
120 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: ...
user avatar
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 ...
user avatar
0 votes
1 answer
51 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 ...
user avatar
  • 203
11 votes
1 answer
320 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. ...
user avatar
  • 12.3k
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}]]; ...
user avatar
1 vote
2 answers
85 views

What are the limitations of RecurrenceTable?

Background Consider a recurrence relationship defined in terms of the following recursive functions (which works correctly): ...
user avatar
3 votes
1 answer
101 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 ...
user avatar
  • 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 ...
user avatar
  • 12.3k
1 vote
1 answer
57 views

Assiging Plot Range to Variables Works For X but Not Theta

Observe the following Mathematica code: ...
user avatar
  • 571
0 votes
2 answers
64 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 ...
user avatar
  • 571
1 vote
1 answer
29 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 <...
user avatar
  • 1,406
0 votes
0 answers
65 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 ...
user avatar
  • 12.3k
1 vote
0 answers
61 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 ...
user avatar
  • 648
0 votes
1 answer
71 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 ...
user avatar
  • 285
1 vote
0 answers
113 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 ...
user avatar
  • 113
21 votes
1 answer
437 views

What's the difference between these 2 associations?

I have 2 associations similar to these simplified ones: ...
user avatar
  • 19k
2 votes
0 answers
64 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 ...
user avatar
  • 403
1 vote
2 answers
139 views

'Do' loop acting on a global variable

I need a code that will allow me to alter a matrix (a global variable) iteratively using a function update (which depends on ...
user avatar
0 votes
1 answer
47 views

Expression unexpectedly not evaluating to a numerical value [closed]

When I calculate the below, I get an unexpected output, not giving me the density, but rather a value M * .. ...
user avatar
  • 223
3 votes
2 answers
78 views

Basic replace with parameters questions

I have looked over MMA SE but seen nothing to help clarify this for me. what I want to do is set some parameters for a curve, and then I want to automatically replace the x,y,z of, say, a vector field ...
user avatar
  • 105
17 votes
1 answer
379 views

Broken ValueQ function in Mma12.2?

f[x] ^= 1; ValueQ[g[x]] returns True in Mathematica 12.2. Is it a bug?
user avatar
  • 631
1 vote
0 answers
36 views

How to Inherit Arrowheds size?

I'm trying to write a Module that produces some arrows with custom Arrowhead shapes. However, I want the code external to the <...
user avatar
  • 1,406

1
2 3 4 5
11