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
145 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
333 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 [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 ...
-1
votes
0answers
51 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
41 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 ...
2
votes
1answer
44 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
65 views

Combine 2 plots in one [on hold]

$f: R^2 -> R,$ $f(x,y)=x²-y²$ ...
8
votes
1answer
104 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
207 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
124 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
69 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. ...
0
votes
0answers
77 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
27 views

Sorting orthogonal null space vectors

My program generates orthogonal null space vectors such as this: ...
1
vote
0answers
22 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 [on hold]

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
380 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 ...
4
votes
2answers
117 views

Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method

Motivation I am using Mathematica to implement System Dynamics (SD) models, e.g. differential equation models as applied to management/economic problems following the "methodology" of Jay W. ...
1
vote
0answers
29 views

Can LinearSolve use Parallelize and WorkingPrecision in computation

I am looking for a two things while calculating the large array matrix equation: 1) To increase the precision in simple LinearSolve[] function 2) To find a way to parallelize the computation on all ...
1
vote
1answer
43 views

Solving ODE having function which changes conditionally

I want to solve the following set of ODE with a piecewise function A[t] which changes if a certain condition is satisfied. ...
0
votes
0answers
39 views

Solving a delay partial differential equation

I am trying to solve the following partial differential equation, $$\frac{\partial\phi[t,x]}{\partial t}=-2\pi\ \delta \ e^{-t}\phi[t,\mu]^{-2} \frac{\partial}{\partial x} \phi[t,x](x-\mu)$$ where ...
0
votes
0answers
42 views

Solving a nonlinear equation involving convolution

I consider the following functional : $\psi(u,v)= -u(1-v)(1-\alpha k * v) + \epsilon v (\alpha k * v)$, where $k(x)$ is a smooth kernel with $\int |k| = 1$ and $\int k_+ = \alpha \in ]0,1[$, $u(x), ...
1
vote
2answers
75 views

Plotting the solution of a cubic equation against a coefficient in the equation

I have to plot the solution of the following equation against the coefficient $L$. Since it's a cubic equation, I'd like to filter out the real solution first and plot that then. The equation is $L ...
0
votes
0answers
33 views

Shorter code for repetitive commands [duplicate]

How to give a shorter one or two line command without repetition (single variable change in a subroutine): ...
-1
votes
0answers
25 views

Changing font of plot axes labels [duplicate]

I was wondering if anyone knew how to make these 2 plots in Mathematica (or any software in which we could). I have the font (it's the LaTeX font) but I am not sure how to set the axes' font to that. ...
1
vote
2answers
56 views

Discrete Measure between Binary Vectors

I would like a discrete distance measure between two binary vectors (or strings). Like HammingDistance but I want the vectors to be considered closer if they have ...
0
votes
1answer
41 views

Adding circles on a function plot depending on the slope

I have the following function and I use manipulate to change the plot of the function and the integral respectively. In nonlinear dynamics one plots a little circle/point on the intersections of the ...
3
votes
1answer
30 views

Disassambling a boundary mesh into pieces and building it back again fails. Why?

I have just a misunderstanding of a sort. What I want is (1) to build a boundary mesh, (2) then to disassemble it into a list of the boundary points, and (3) to further assemble it back starting from ...
0
votes
1answer
41 views

Beginner: Iterative Sequence for Vector Function

I want to create an iterative sequence for two Vectorfunctions, where both are dependent on the same variables and i represents the vector. For simplicity let's ...
8
votes
1answer
158 views

Possible Method for MatrixExp

Well, probably a hard question, but I think it's better to cry out loud :). I noticed that MatrixExp owns Method option when ...

15 30 50 per page