2
votes
1answer
80 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
108 views

recurrence equation, result members don't contain the number 5 [closed]

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?
7
votes
0answers
48 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
68 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
106 views

How to convert a system of parametric equations?

I have a system of parametric equations (t is a parameter) ...
4
votes
2answers
154 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
42 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
129 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
147 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
336 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
102 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 [closed]

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

Animation of Strain Effect in 3D graphene lattices [closed]

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
47 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
68 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 ...
3
votes
1answer
50 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 [closed]

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
69 views

Combine 2 plots in one [closed]

$f: R^2 -> R,$ $f(x,y)=x²-y²$ ...
8
votes
1answer
105 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 [closed]

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 [closed]

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
209 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
166 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
70 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 [closed]

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
64 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 ...
6
votes
2answers
142 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
70 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
102 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
100 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
59 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. ...
0
votes
0answers
99 views

Heuristic Method to create an uniform distribution of points

Introduction I am now trying to program an algorithm to achieve an uniform distribution of points within a space of dimension n. I started working in 2D. The idea is to achieve an uniform ...
0
votes
1answer
28 views

Sorting orthogonal null space vectors

My program generates orthogonal null space vectors such as this: ...
2
votes
0answers
25 views

Marginal distribution with weight

Given a multi-variate distribution $P(\mathbf{x},\mathbf{y})$, I would like to obtain the marginal distribution $$P_m(\mathbf{x})=\sum\int_{\mathbf{y}}P(\mathbf{x},\mathbf{y})W(\mathbf{y})$$ In my ...
-2
votes
1answer
44 views

Need help to solve this math question when x reach 0 [closed]

My son can home and ask me to help him with this equation: lim ((x-2)/(2x-1))^(1/x) x→0 I try to use /www.symbolab.com but its too complicated to solve this. Thanks with the help
17
votes
1answer
398 views

A better simplification function

I am creating this question and posting an answer to it as a help for those who have problems with Mathematica simplification oddities that appear in many other questions on the site. First of all, ...
0
votes
1answer
46 views

Series of integrate in exponential

Why Mathematica cannot perform this series: ...
2
votes
1answer
32 views

Query about Exclusions

I guess this has already be answered. Plot[1/(x^3 - 2 x^2), {x, -2, 4}, Exclusions -> True] Plot[1/(x^3 - 2 x^2), {x, -2, 4}, Exclusions -> 2] I cannot ...

15 30 50 per page