# Tagged Questions

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

139 views

### ReplaceRepeated as a Looping construct?

There are a lot of discussions about looping constructs (notable example here). Wolfram language guides, as usually, contain most relevant links. Looping constructs guide has the following part on ...
193 views

### How to check and reset the boolean value of many options one times?

I defined a function which owns many options. In addtion, these options have a common characteristic. Namely, only accepting boolean value True or ...
91 views

### Strange behavior of UpSetDelayed together with MakeBoxes

In order to answer this question, I just stumbled into the world of UpValues. Though I managed to find a solution for the problem, I'm confused by my own code now 囧,...
71 views

### How to get “BasicFunctions” from WolframLanguageData with implicit entity

I am trying to get a list of the functions that have property "FunctionalityAreas" -> "BasicFunctions". The following does not work: ...
198 views

### Why assign variables to empty curly brackets?

I am trying to read code and I see empty curly brackets. For example: abc = {} or fort[x_] := Module[{}, more stuff here ] ...
52 views

### KeyIntersection fails (?) when an association is empty

I think I found a bug in KeyIntersection (Mma 10.2). To illustrate, input the following: ...
180 views

### Using Mathematica's Position Function

I have a list a = {-1, 2/3, -2 - 4 I, -2 + 7 I, 2 I} and when I use the Position[a, I] it returns ...
95 views

### Understanding Part and Span operating on expressions with heads that are not List [duplicate]

I hope this is not a duplicate. I do not understand how does the Part and Span functions work on this expression: ...
42 views

### How to use With on previously defined expressions [duplicate]

The command With[{x = 1}, x] outputs 1. The command t = x; With[{x = 1}, t] outputs ...
48 views

### How to label outputs from Print [closed]

I have problem with Print in Mathematica. The data that I get from it, is not labelled so that I can use it elsewhere, therefore I have got to label them manually. ...
519 views

### Difficulty understanding difference between == and ===

After doing this: ...
234 views

### Defer, Hold, Unevaluated, Inactivate — which one when?

What are some guidelines on which function to select from among the superficially similar functions Defer, Hold, ...
145 views

### Row-wise matrix multiplication

I have a matrix $A=\{a_{ij}\}$ of dimensions $n$ rows by $m$ columns, and I would like to multiply each row of the matrix by a constant $b_i$, $i=1,\ldots,n$, and store the result in the same variable....
63 views

### Out[] is returning percent sign % instead of expression 10.3 [closed]

Has anyone else had this problem, is it a setting, or a bug in 10.3? In[1]:= 2; %+2 Out[2]= %1+2
314 views

### Wolfram Language symbols by their Ranks

I'd like to get the top 50, the bottom 50 and an ordered list of all Wolfram Language symbols based on their "Ranks". With ...
54 views

### Weird variable report

All, What does this mean when it shows up in your notebook? ?f f Global CreateUUID["Info-"] False False False ?x x Global CreateUUID["Info-"] False False False What has happened? ...
33 views

### elementwise operation with vector and matrix (“broadcasting”) [duplicate]

In languages supporting broadcasting, one can easily do elementwise comparison of a vector and a matrix. What is the recommended approach in Mma? For example, suppose I want to do a ...
92 views

### Formulate an equation to find a fixed point [closed]

I have the following equation: Subscript[x, n + 1] = Subscript[x, n]^2 + c with Subscript[x, 0] = 0. This equation is restricted ...
507 views

### Defining indefinitely many functions

Is it possible to define a class of indefinitely many functions f1, f2, f3, ... such that <...
79 views

### Manipulate: how to hide manipulator

Suppose one creates a simple Manipulate in a notebook, with a single numerical control and no changing of the default appearance. Then there is a small + in the upper right, for accessing the ...
44 views

### should Variance of EmpiricalDistribution include Bessel correction? (it doesn't)

I was rather surprised by this: ...
37 views

### when to use Select vs Cases [duplicate]

Given a list lst and a Boolean function f, are there any interesting differences in the following? ...
288 views

### What evaluation mechanism is behind Mathematica support for multiple definitions of a function? What is the benefit of this?

I am studying the question What are the most common pitfalls awaiting new users? Up to now, I have fulfilled some of the parts but yet don't understand which this problem is related to? Consider the ...
600 views

### What are the requirements for a well behaved indexed variable? Subscript, ToExpression, Downvalue?

On writing this answer I needed to call a function, (NonlinearModelFit) with an unknown number of parameters. We have learned that we should not use ...
50 views

### SortBy second item in each list item [closed]

I have: mydata = {{1, "NEBRASKA", 2.7}, {2, "NORTH DAKOTA", 3.}, {3, "UTAH", 3.6}, {3, "VERMONT", 3.6}, {5, "HAWAII", 3.7`}} Now, I can do: ...
64 views

### How to put a levelspec in operator form? [closed]

All variable argument functions need Function wrapped around them in operator form, but is there any other way to achieve this: ...
104 views

### Indexed and array-valued interpolations

Bug introduced in 10.1 or earlier and persisting through 10.3.0 or later Using Indexed on an InterpolatingFunction leads to ...
36 views

### Unexpected behavior from Return called in a Block [duplicate]

I like to write functions that dispose of failure cases early, before they do the main calculation, but I don't like to write cascading If statements. Here is a toy ...
439 views

### Why is an Identity function needed?

Today I came across the function Identity[x] in Mathematica (documentation). The example given in the documentation uses it in ...
22 views

### How to ValueQ a symbol, constructing the symbol name from strings? [duplicate]

In a function I'm writing, I need to check whether a particular symbol has been assigned a value (any value) in a particular context. This would work: ...
88 views

### Which symbol gets DownValues or OwnValues when using SetDelayed?

I have been looking at various usages of Pattern objects. Here's a number of ways to define the same thing: mod[x_] := {x} ...
239 views

### Pattern and Orderless function

I'm a Mathematica beginner. I am exploring the use of patterns and (only for fun) am trying to implement a permutations function. My (dirty) code is: ...
47 views

### Could I use Select with condition on any column other than First (Last)? [closed]

I often deal with huge tables of various functions of randomly generated values for my research. Sometimes there's need to only keep rows which satisfy a specific condition. This is easy with ...
78 views

### What's in a Name? [closed]

StringReplacePart["StringReplacePart","At",{14,17}] ... Surely you can't be serious? ... Naming Matters: I think what and how we call things is underestimated ...
68 views

### How can an argument of the form f[t] be injected into the RHS of a function definition [duplicate]

This is what I want, for an arbitrary function x This is what I have done: ...
110 views

### Cannot Block Plus

It is customary to use the following idiom to partially evaluate something inside a held expression: ...
51 views

### The FindRoot output only with numbers [duplicate]

I have this code in Mathematica: FindRoot[{Sin[x - y + 2] - x == 0, Sin[2 x - z] - 8 z == 0, Sin[z + y + z] - 2 x == 0}, {{x, 0}, {y, 0}, {z, 0}}] where it's ...
52 views

### How to make Mathematica to assemble components we already have like a regular input

Suppose we have the following list: {5, 3} I want to add the -> to the end of the first element in the list in Mathematica ...
93 views

### How should I enter indexed terms? For example, constants $n_k$ for $k\in\{1,\,\ldots,\,N\}$

How should I enter $\quad \quad \sum^{N}_{k=0}{f(n_k)}$ into Mathematica? More generally, how should I work with the indices? Take the following as an example. I know how the ...
59 views

### Boundedness of an expression

First post on this part of the stackexchange network, I was just wondering if Mathematica allows one to quickly see if an expression is always within a certain range given values for the parameters it ...
155 views

### A question on using Cases [closed]

I am working on Wagon's FindRoots2D section. Clear[f]; f[x_, y_] := x - y^2 Cos[y]; g[x_, y_] := -y + x Sin[x]; fcnVec[{x_, y_}] := {f[x, y], g[x, y]}; I am ...
70 views

...
158 views

### DownValues when using Set and SetDelayed

It is known from several questions asked in SE that one of the basic differences between Set and SetDelayed is that the former ...
44 views

### Equality of expressions containing complex numbers [closed]

I am using Mathematica to test the equivalence of symbolic expressions. I run into what appears to be a bug when I test the equivalence of expressions involving an imaginary number taken to a complex ...
48 views

### Order of evaluation of Exp and Normal on result from Series

This may be more math related than Mathematica related, but I thought this might be of interest to the group. I'm trying to work with some Taylor Series approximations of functions that are ...
76 views

146 views

### How I can count multiplications in an experssion?

Next task to complete: Count *-symbol in such expression as a + s^2*b - c/y + o^3 + n*m*u (in this case count of ...
87 views

### Setting up a system of equations for solution

There are two lists as follows: ...