# All Questions

82 views

Suppose I have a quadratic polynomial in two variables x and y in which the squares with respect to ...
21 views

### Print to console bis

In the answer to this question, one explains how to use a function PrintToConsole[...] to print output to the console. My question: can you make a global definition that will automatically ...
16 views

### How to calculate whether a ray intersects an arbitrarily oriented bounding box? [migrated]

The bounding box is not axis-aligned. It can be rotated. I now have the origin of the ray, and direction and each coordinate of the eight vertices of the bounding box. what can I do to find out this ...
58 views

### Map an Argument to a list of functions

I want to "map" an argument to a list of functions. Here is the concrete Problem. I generate a list "Messungfit" of functions: ...
37 views

### Defining initial conditions [on hold]

how do I define the initial condition before solving a partial differential equation in order to compare the solution to that of a model?
87 views

### How to map over the corresponding elements of matrices [on hold]

I'm working on some genetic algorithm code, and I'm seeking help to select the corresponding elements of a matrix in order to perform crossover on the chromosomes in population of individuals I want ...
78 views

### How to make a 3D plot using polar coordinates?

From the beginning: I have function $u(r)$ and radial symmetry in system. Also I've got results as data array ${u_i(r_i)}$. And I want to plot it as $u(x,y)$. Due to radial symmetry its gonna be like ...
43 views

### Find the numerator of 6/8 [duplicate]

The statement Numerator[6/8] evaluates to 3. Numerator[Hold[6/8] does not work. What function NewNumerator[6/8] evaluates to 6?
6 views

### How to find the mode when none of the terms repeat? [migrated]

What is the mode of a series / distribution of values when none of the values of the distribution are repeated , for example : What is the mode of 1 , 3 , 45, 67 , 89 , 100
60 views

### Plot x and y ErrorBars from file

If I have a set of data like this one saved in a txt file ...
81 views

### recurrence equation, result members don't contain the number 5 [on hold]

print the first 5 members of the array a[n+1]=3*a[n]+7 which don't contain the number 5. a1=6. so a[2]=3*6+7=25, but 25 has the number 5 so we go to a[3]. a[3]=25*3+7=82 <--- this is OK... and ...
30 views

### Estimating fundamental matrix for stereo pair

I want to calculate fundamental matrix for stereo pair. Matlab has this function - estimateFundamentalMatrix. Is there an analog in Mathematica? If no how I can calculate it?
45 views

### Fitting NURBS surface from point clouds

I'd like to build a large surface with many knots using BSplineSurface to play with Mathematica's parallel computing capabilities. The questions are where can I ...
46 views

In Mathematica 10.0 and 10.1, according to the documentation of TransitiveReductionGraph: The transitive reduction h of a graph g is a graph that has the same ...
66 views

### What is the status of the FindMinimum method “QuadraticProgramming”?

As a method option to FindMinimum "QuadraticProgramming" is still a valid option. It has the advantage of being significantly ...
103 views

### How to convert a system of parametric equations?

I have a system of parametric equations (t is a parameter) ...
152 views

### When are numerical expressions identical

Very elementary: 2 + 3 == 5 evaluates to True and 5 == 5 evaluates to ...
34 views

### Plotting partial sums of Taylor Function

I need to plot the partial function: $T_f(x)=\log 2+\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{2^kk}(x-2)^k$ for $n=2$,$n=4$ and $n=6$ on the same plot over the interval $[-\frac{1}{2},4]$ and also the ...
41 views

### Constrained optimization and problem with complex numbers

I am trying to solve a constrained optimization problem with an implicitly defined function $\pi$. The problem is non linear and of high order, so I use numerical methods instead. The code I use is: ...
123 views

### Evaluate $\pi$ using While

I am given the following exercise: Evaluate $\pi$ using the formula $\pi = 4 - \sum_{n=1}^{\infty} (-1)^n \frac{4}{2n +1}$ with precision $\epsilon = 0.0001$. First I defined the function I need ...
57 views

### plot randomly oriented lines

I want to create the following graphic: A set of line-elements are randomly oriented in planes parallel to xy-plane. In addition, on each plane the drawed line-elements should not cross each other. ...
143 views

### Simple way to concatenate Dataset columns

Consider these two datasets: d1 = Transpose@Dataset[<|"a" -> Range[5]|>]; d2 = Transpose@Dataset[<|"b" -> Range[5, 1, -1]|>]; {d1, d2} What's ...
331 views

### Simple Monte Carlo simulation

I want to find the Monte Carlo simulation of the integral $$\int_0^1 \sqrt{1-x^2}\mathrm dx$$ The Cesàro mean is $$I_n=\frac1n\sum_{k=1}^{n} f(U_k)$$ I want to plot the scatter plot ...
101 views

### Solving an integral equation numerically

my problem is: I get the result of definite integral and now I need to find the upper limit for the same integral but with opposite sign value so f2=-f1. ...
43 views

### Problem with Integration [on hold]

I have a problem with numerical integration of this function. Is there any way for this calculation? ...
64 views

### How to evaluate sum with different coefficient in each term?

I would like to know if there is a syntax that allows me to enter a sum that has coefficients that vary for every term? I have no interest in evaluating them numerically, but rather to keep them as ...
50 views

### Animation of Strain Effect in 3D graphene lattices [on hold]

How can i create a 3D single layer graphene honeycomb lattice and manipulate it by a strain effect along the two cartesian axes (x,y)?
40 views

### Plotting datasets using ErrorListPlot

I am trying to make list plots with the ErrorListPlot function. I have two datasets (ds1 and ds2) of which one plots nicely (ds1) and the other just give blank plots. I cannot see any difference in ...
62 views

### How to conditionally combine a RegionPlot3D with a ContourPlot3D inside a Manipulate?

I know how to combine a RegionPlot3D and a ContourPlot3D, which I did (see below for details on the code I'm referring to) with ...
39 views

### Running bits of code in a separate kernel

I am using Mathematica to generate 3D graphics frame for a video. The process goes as follows: Loop over a counter i Use ...
45 views

### Extracting points from highly oscillatory data [on hold]

I got an implicit function , say f(x,y)=0, and I drew a contour plot of it as shown below(the points of interest (POI) are inside the red circles): Now, I want ...
63 views

### Combine 2 plots in one [on hold]

$f: R^2 -> R,$ $f(x,y)=x²-y²$ ...
102 views

### What's the goal of the Macros package?

I see in the Mathematica install a Macros package. In windows the paths is for example: ...
34 views

### Summing Over a Variable Number of Terms [on hold]

Is there a straightforward way to calculate the following sum ? ...
145 views

### Does Reduce give complete and necessary conditions?

I want to obtain a solution for a system of five inequalities. For instance, ...
30 views

### ImageData to Image to ImageData, in LABColor [on hold]

Given an $m\times n$ image $G1$, I'm trying to: Extract the $mn$ pixels of $G1$ as an $n\times m$ matrix $M1$ of triples, where each triple represents the color in LAB space. Turn $M1$ into an ...
206 views

### How to plot an implicit function; how to plot contours of a surface

How can I plot the circle $(x-4)^2 +(y-4)^2 = 4$ and two level curves of $f(x,y)=x^3 + y^3 - 3xy$ on Mathematica. I have tried using the ContourPlot command. Can ...
7 views

### Divisibility by 9 with negative numbers [migrated]

I know that the rule to check divisibility by 9 is to check if the sum of the digits of the number are divisible by 9. But what if the number is negative? Thanks in advance!
54 views

### Undo automatic update

I was working with Predict function (with a neural network and today, and when I executed the same notebook I have been working for some time, Machine Learning package was automatically updated (it ...
75 views

### Why can Reduce solve for Integers but not for Reals?

I'm showing as an image, since the question is generic. If we remove $m$ from the inequality we get both solutions. Why doesn't the first inequality work for both domains? Edit here is the code per ...
113 views

### Permutations on elements a>b && b>c

A={1, 2, 3, 4, 5} Permutations[A, {3}] I need to print all permutations where the first number is bigger than the second and the second number is bigger than the ...
71 views

### Evaluation speed of apparently equivalent functions

Consider the following expressions: f[x_Integer] := x, f[x_] := x /; x ∈ Integers, f[x_?IntegerQ] := x All of the expressions above (and probably others which ...
69 views

### Matrix with infinity on main diagonal

The question is trivial, however, there might be unexpected solutions. What would be nice way to create a square matrix with $\infty$ on main diagonal, and some arbitrary constant everywhere else? My ...
32 views

### Understanding a code for exploring XML tree [on hold]

I have a code similar to the XMLNote code given as an example in a tutorial in Mathematica, which permits one to explore the tree structure of an ...
63 views

### using FindRoot with a Module that takes a parameter

Observed an error when calling a Module from FindRoot. I created a module which first solves a differential equation and then returns the value of that differential equation when the independent ...
138 views

### What does the AspectRatio option actually do?

The Documentation for AspectRatio on its first line under the "Details" section states: "AspectRatio determines the scaling for ...
68 views

### How to avoid the pink background in GUIs without using Quiet

GUIs may generate warnings while internal evaluations are processed. In this example I intentionally introduce a line that will generate a warning. Warnings are useful, so I don't want to quiet them ...
100 views

### Coloring points via “TemperatureMap” [duplicate]

I have a collection of 3D points, and each is associated with a real number in [0,1]. A typical element looks like {{x,y,z},c} where ...