# All Questions

5 views

### Key->Value or Value when returning (multiple) parts of an Association

There seems to be an idiom whereby multiple parts generates Key->Value forms whereas for single part specifications, only a Value is returned. This however, can lead to inconsistencies as follows: ...
55 views

### Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
42 views

### Using ReplaceAll to replace a head

Why would this work to replace the head b with newHead: ...
312 views

### How can I solve my system of differential equations?

this is my attempt to resolve the problem below using NDSolve. i do get the plot which gives the correct roots for E2, however, the Erzek root search gives nothing for E2...i guess my shoe got pinched ...
40 views

### Learning Resources for Data Science in the Wolfram Language

I'm delivering an upcoming course on Data Science with the programming/analysis done predominantly in the Wolfram Language. I created the following table to leverage students' familiarity with Lists ...
28 views

### Why can NSolve only solve this system of equations after trivial substitution?

The first system immediately yields {}, but the second, equivalent, system yields the solution {{k -> 4.96048, tl1 -> 1.64842, tl2 -> 2.07466}} : ...
36 views

### Interpolation function rejected by ContourPlot3d

I was playing around with the bouncing ball example, and decided to make a 3d version. I decided to use Contourplot3D for a simple independent 3D presentation. ...
20 views

### What is that Root[…] inside the answer represent? [duplicate]

So I am encountering this situation, in which mathematica doesn't give me the answer, but in a form of "Root". How do I interpret this ? what is the number after the "&" represent? How should I ...
614 views

### Cheat sheets or reference cards for Mathematica

In order to improve my workflow with Mathematica, I'm looking for cheat sheets. The purpose of such reference cards is to be printed and to stay on the desk during the learning of a new programming ...
51 views

### Undirected Network and its Monte Carlo Simulation

So I have this array of points, in the form {x, {y,z}}, where x is the node number assigned when I used the locator pane to make a network, and y and z are its unitary coordinates. The graph is made ...
158 views

### Conditional Expectation — How can Mathematica find a more general closed form?

Mathematica can't find a solution to this Expectation. ...
86 views

### Given f[1] … f[k], k = 1, 2, 3… how do one find the general function f[n]?

If I have that $$f(1)=2\;a\;b,\quad f(2)=2\;a\;b\;(1+6\;a),$$ $$f(3)=2\;a\;b\;(1+9\;a+12a^2),\quad f(4)=2\;a\;b\;(1+21\;a+72\;a^2+60\;a^3),$$ $$f(5)=2ab(1+45a+300a^2+600a^3+360a^4),$$ ...
86 views

### Probablity weighted ReplaceAll

I'm looking for an elegant way of doing a probability weighted replacement rule, something like this ...
24 views

### How to handle infeasible points in FindRoot?

I am calling FindRoot[f[x,y],{{x,xInit,xMin,xMax},{y,yInit,yMin,yMax}}] where for some points {x,y}, ...
73 views

### Improving the speed of evaluating Table with nested functions

I am a Mathematica novice working with a stack of 1024 x 1024 WatershedComponents (or MorphologicalComponents) label matrices ...
127 views

### Changing Values in an Association using Map

I am trying to change the value of one key in an association based on the value of another key in that association. So if my association starts as: ...
53 views

### why head Association cannot be replaced by head List [duplicate]

Consider replacing head of List by head Association: {a -> x, b -> y, c -> z} /. List -> Association (*<|a -> x, b -> y, c -> z|>*) ...
30 views

### Plotting and NIntegrate [on hold]

I have a problem. I try to make such a plot: function = y^(3/2)*Exp[I t y - y^2]; Plot[NIntegrate[function, {y, -∞, ∞}], {t, -20, 20}] But I have no plot - I ...
65 views

### How to get a list of all expressions in a notebook matching a certain pattern?

Suppose I have a Mathematica notebook saved to a certain location on disk. Given a pattern I need to get the list of all expressions matching this pattern that appear in input, output or print cells ...
262 views

### How to measure cross sectional area of Tube

I have modified my question to a simple version. I have vertex clusters, polygons and a list of center points. Attached pts and polygons of 3d tube are: ...
73 views

### Can NDSolve handle discountinuos data?

It is possible to numerically solve a differential equation if not-smooth data are involved? For example the following instruction return the error NDSolve::bvdisc: ...
147 views

### Testing Credit Usage in Wolfram Programming Cloud

I currently have a free WPC account, which I am using for testing purposes. Amongst other things, I want to find out more about how the credit system works, in particular how many credits are used, ...
103 views

### Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
45 views

### Operator-Input Form for Lists?

The documentation on Operator-Input Forms shows the following example which suggests that there is an alternative, convenient, operator-style, tidy technique for inputting lists. However, there is ...
153 views

### A Case of DeleteCases for WeatherData

I am trying to use ListVectorPlot in combination with WeatherData and CountryData to show ...
74 views

### Is there a faster way to Map an Association?

Consider mapping an existing Association in a manner such as this: ...
52 views

### Substitution in Mathematica [on hold]

I am new to Mathematica and hope to learn a lot here. Could you help me with the question below. Thanks! Here is the expression: ...
27 views

### Automatic substitution of fractions

I have several equations with many variables, and here and there I would like to do a variable substitution. For example, in the equation: a (b + 42 c / d) I ...
104 views

### Which function definition is used to evaluate an expression that matches the lefthand side of more than one definition?

In a case like this: f[a_] := a; f[{a_, b_}] := a; I'm wondering whether I should expect f[{2, 3}] to return ...
245 views

### Fast method to select matrix elements based on a vector of positions

There is an operation for which I have long wanted to find a better solution. Let: a be a matrix of dimensions $m\times n$ ...
82 views

### How do I exclude the vertical line plotted at a discontinuity?

Condsider function = Tan[1 x] + Tan[2 x] Plot[function, {x, 0, 1.5}] It has a strong discontinuity around 0.8. The problem is , if I want to find ...
544 views

### Why is the new PositionIndex horribly slow?

Disconcertingly I have discovered that the new (v10) PositionIndex is horribly slow. Using Szabolcs's clever GatherBy inversion ...
27 views

### Unique CellID in-between notebooks

Documentation says that CellID is guaranteed to be unique for a given notebook. I've noticed that CellID are fairly high numbers and although probabilistically speaking the odds of coincidence are ...
83 views

### How do I plot a U- form cylinder

I'm really new to Mathematica, trying to learn some things, but I need help trying to plot this kind of cylinder, a U tube like cylinder. Tried to use an example code like this, and then vary some ...
69 views

### Inconsistency of output format in Eigenvalue

I am bothered by the output format of the last two elements of efre. Is there a way to make these two look like the same format as the first two in ...
127 views

### Converting a nested for loop from MATLAB

In MATLAB I have the following series of nested for loops that update a matrix. (It's not my code, but someone else's that I'm trying to replicate - I don't know ...
35 views

### Black line after ImageTrim

as shown in Image correlation I would like to detect the shift between a stack of images. Here are the images: and here the code: ...
47 views

### Why does one Monitor expression work while another fails?

I have a (somewhat involved) function f[x?NumericQ, y?NumericQ] and for some reason it behaves differently when given a Table ...
35 views

### Solving a system of equations over a custom domain

I'm trying to solve a system of linear equations with a large number of variables, but Mathematica is having real trouble finding solutions in a reasonable amount of time. One thing I thought would ...
31 views

### Specifying parameters for the Ticks option [on hold]

I'm trying to use Ticks option with ListLinePlot to put ticks at 1, 2, 3, 4, 5, 6, and 7 on the x-axis the points and at 1, 2, ...
17 views

### How Construct Clopen-Compact Bitopological Spaces? [migrated]

Dear all who love general topology, In general topology we know the notion of clopen-compact spaces (introduced by A. Sostak): a topological space $(X,\tau)$ is called clopen-compact if every clopen ...
103 views

### Providing a color function for ListPointPlot3D

Is there a way to write ListPointPlot3D expression, so when given a list of points, the the color of the points plotted is a function of the index/element number of ...
82 views

### Deploying to the Cloud for Public Access

I wanted to test how a simple deployed program would appear to a non-mathematica user. I did the following, from within a Mathematica notebook: ...
3k views

### Finding the centroid of the area between two curves

When I have an area bounded by curves, is there a built-in way to find the center of the area? Or do I have to plot it first and then use ComponentMeasurements on ...
163 views

### GUI of a Karnaugh Map (2)

Adopting kguler's answer to my previous question, I managed to get the simplified map by using Mathematica's build-in function BooleanMinimize. The tough job left ...
141 views

### Dataset with no members

I am trying to plan a framework for relational algebra using the Dataset capability of Mathematica 10. In the work of Date and Darwen, there are two concepts known as TABLE_DEE and TABLE_DUM. ...
42 views

### 1D bin packing solution with NMinimize or NMaximize (use minimal office space) [on hold]

I want to use NMinimize to solve a 1D bin packing problem. The goal is to assign a large number of staff to as few rooms as possible. The empty rooms can then be sub-let and generate income. Hence ...
256 views

### Error changing Dataset using Part

In the new guide Computation With Structured Datasets we can find this part, on how to change a Dataset But if we create a Dataset like: ...