1
vote
4answers
82 views

How find constant term of quadratic with square already completed?

Suppose I have a quadratic polynomial in two variables x and y in which the squares with respect to ...
2
votes
1answer
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 ...
0
votes
0answers
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 ...
3
votes
0answers
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: ...
0
votes
0answers
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?
1
vote
3answers
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 ...
2
votes
1answer
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 ...
2
votes
0answers
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?
0
votes
0answers
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
1
vote
1answer
60 views

Plot x and y ErrorBars from file

If I have a set of data like this one saved in a txt file ...
0
votes
2answers
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 ...
-1
votes
0answers
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?
1
vote
0answers
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 ...
6
votes
0answers
46 views

Question about TransitiveReductionGraph

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 ...
4
votes
1answer
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 ...
0
votes
1answer
103 views

How to convert a system of parametric equations?

I have a system of parametric equations (t is a parameter) ...
4
votes
2answers
152 views

When are numerical expressions identical

Very elementary: 2 + 3 == 5 evaluates to True and 5 == 5 evaluates to ...
0
votes
1answer
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 ...
0
votes
0answers
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: ...
1
vote
1answer
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 ...
0
votes
1answer
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. ...
8
votes
2answers
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 ...
4
votes
2answers
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 ...
2
votes
1answer
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. ...
-3
votes
0answers
43 views

Problem with Integration [on hold]

I have a problem with numerical integration of this function. Is there any way for this calculation? ...
1
vote
1answer
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 ...
0
votes
0answers
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)?
1
vote
1answer
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 ...
4
votes
2answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
1
vote
3answers
63 views

Combine 2 plots in one [on hold]

$f: R^2 -> R,$ $f(x,y)=x²-y²$ ...
8
votes
1answer
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: ...
0
votes
1answer
34 views

Summing Over a Variable Number of Terms [on hold]

Is there a straightforward way to calculate the following sum ? ...
4
votes
1answer
145 views

Does `Reduce` give complete and necessary conditions?

I want to obtain a solution for a system of five inequalities. For instance, ...
1
vote
0answers
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 ...
1
vote
3answers
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 ...
0
votes
0answers
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!
3
votes
0answers
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 ...
1
vote
1answer
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 ...
3
votes
3answers
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 ...
2
votes
2answers
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 ...
1
vote
2answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
5
votes
2answers
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 ...
4
votes
0answers
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 ...
2
votes
1answer
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 ...
4
votes
1answer
99 views

AspectRatio option works unpredictably?

Let us examine the agreement between specified value for the AspectRatio option and the actual aspect ratio of generated plot. For this purpose I define a function ...
2
votes
1answer
56 views

Solving a time-dependent structural mechanics problem with Finite Element

I'm trying to solve a time-dependent structural mechanics problem with Finite Element. I modified one of the last samples in the "Solving Partial Differential Equations with Finite Elements" Tutorial. ...

15 30 50 per page