Questions tagged [wolfram-language]

Wolfram Language is a knowledge based, multi-paradigm programming language. In a first approximation, the Wolfram Language = Mathematica + Wolfram|Alpha + Cloud + more. It's compatible with Mathematica, but it's a significant evolution, including knowledge, deployment and many new ideas.

This tag should be used on questions that pertain to the Wolfram Language created by Wolfram Research.

The Language's homepage can be found here: http://www.wolfram.com/language/

Programs can be written in the language via the wolfram programming cloud: https://programming.wolframcloud.com/app/

100 questions
4
votes
1 answer

Python equivalent of Wolfram Table[]

In wolfram Mathematica, I use Table[] function all the time. Example of Table function i1^2 + i3^3 could be any function of parameters (i1,i3). and {i1, 1, 9, 2}, 5, {i3, 7, 3, -.5} is the space of parameters. For more details see the…
GalZoidberg
  • 141
  • 3
4
votes
3 answers

pattern matching in pure functions

I need to define a pure function that takes two arguments and returns their quotient. If the divisor is 0 then I want to return 0. If I had a named function then I would do div[_, 0] := 0 div[x_, y_] := x / y how to do the same sort of pattern…
3
votes
2 answers

Porting 3D Rose written by Wolfram Language into JavaScript

I'd like to get help from Geometry / Wolfram Mathematica people. I want to visualize this 3D Rose in JavaScript (p5.js) environment. This figure is originally generated using wolfram language by Paul Nylanderin 2004-2006, and below is the…
3
votes
1 answer

JFlex: Negative look-ahead inside regex

My problem can be broken down to the following which can happen inside a large regex: 1. is a number, but 1.. are two token consisting of 1 as number and .. as an operator. The definition of a number in the Wolfram Language is very complex (I append…
halirutan
  • 4,281
  • 18
  • 44
3
votes
3 answers

What does True mean in this Wolfram output?

Here's a simple WolframCloud computation: The answer is 1 when 0 < x < 1 is True and 0 when 0 < x < 1 is False, so why in the world does the output associate True with 0? (In WolframAlpha, executing Limit[Boole[0Infinity]…
r.e.s.
  • 227
  • 3
  • 11
2
votes
0 answers

How can one obtain more accurate numerical approximations to an integral involving the floor function in Wolfram Alpha?

After reading sections of the following book by Furdui and a page on the AoPS forum, I got interested in the integral                                                                   Let's denote the value of this integral by A. Then we have that…
2
votes
2 answers

How to reverse multiple lists using the Wolfram-Language

I'm trying to find the best way to solve the question: "Use Range, Reverse and Join to create {3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1}" So basically the given lists are {1, 2, 3, 4, 5}, {1, 2, 3, 4}, {1, 2, 3}. I could easily solve this question but…
PhillipJacobs
  • 2,337
  • 1
  • 16
  • 32
2
votes
1 answer

Can I get AST for wolfram language expressions?

In Mathematica, we use FullForm or TreeForm or Developer'WriteExpressionJSONString to get the syntax details for given expressions. How can I get a complete AST (Abstract Syntax Tree) for any expression? For example, is there any function toAST such…
2
votes
1 answer

Get a wolfram entity value attribute at a time

This is something I've always struggled with. Let's say I want to know the population of Mexico City, I can easily do Mexico City ["Population"] But say I'm making a chart over time and I want to get the population of Mexico City in 1800AD. I…
George Mauer
  • 117,483
  • 131
  • 382
  • 612
2
votes
2 answers

Can you create a pie chart with varying slice sizes in d3?

I'm trying to make something like Wolfram's SectorChart in d3 (https://reference.wolfram.com/language/ref/Files/SectorChart.en/O_5.png). I'm currently using a basic data set of [ { label:0, radius:1 }, { label:1, radius:1 }, { label:2, radius:2…
Rik Johnson
  • 111
  • 11
2
votes
1 answer

What does /; mean in Mathematica?

Does anyone know what does /; mean for example:V[n_][i_/;i<=imax,0];=V[n][i,0]=0 in Mathematica? It's part of a program to draw the eletrical potential function of a rectangular metal trough using the finite-difference methods. Here's the improved…
Jason Yan
  • 33
  • 1
  • 8
2
votes
0 answers

Using wolfram to check biconditional involving predicates and quantifiers

I have a habit of trying out correctness about some logical statements with worlfram alpha by generating truth table for them. For example, I can try if this: ((¬x→y)∧(¬x→¬y))→x is correct or not by geerating truth table for ((¬x→y)∧(¬x→¬y)) which…
Mahesha999
  • 22,693
  • 29
  • 116
  • 189
2
votes
2 answers

Using Wolfram to Play Functions

As a blind person, I am curious as to whether or not I can use Wolfram to play functions. For example, if I were to plugg in y = x squared from -10 to 10, I would expect to hear a decreasing tone as the function flattens out, then a normal tone at…
Pythonicator
  • 49
  • 1
  • 6
2
votes
3 answers

print Grid with list in list as output from Wolfram Alpha

I've executed this instruction in Wolfram Mathematica as Wolfram Alpha Query a = WolframAlpha[ "italy vs england coffee consumption", \ {{"History:AgricultureConsumption:AgricultureData", 1}, "ComputableData"}] and in 'a' there are stored…
2
votes
1 answer

How to skip warnings in a loop [wolfram-mathematica]

My goal is to read in data on all the available stocks at NASDAQ using FinancialData[], and do some computations on it. The problem is (I already contacted the support because of this and it is a known problem), that if I use Slist =…
das_Urmel
  • 23
  • 3
1
2 3 4 5 6 7