# All Questions

2answers
112 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 ...
3answers
91 views

### Combine 2 plots in one [closed]

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

### Does Reduce give complete and necessary conditions?

I want to obtain a solution for a system of five inequalities. For instance, ...
0answers
71 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 ...
3answers
262 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 ...
0answers
62 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 ...
1answer
78 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 ...
3answers
201 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 ...
2answers
77 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 ...
2answers
94 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 ...
1answer
85 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 ...
2answers
165 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 ...
0answers
80 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 ...
1answer
129 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 ...
1answer
114 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 ...
1answer
132 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. ...
1answer
243 views

### Heuristic Method to create low discrepancy sequences

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 ...
1answer
32 views

### Sorting orthogonal null space vectors

My program generates orthogonal null space vectors such as this: ...
0answers
50 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 ...
1answer
52 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
1answer
560 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 other questions on the site. First of all, there ...
1answer
53 views

### Series of integrate in exponential

Why Mathematica cannot perform this series: ...
1answer
63 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 ...
2answers
232 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. ...
0answers
62 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 ...
1answer
54 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. ...
0answers
63 views

0answers
36 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): ...
2answers
77 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 ...
1answer
61 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 ...
1answer
45 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 ...
1answer
55 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 ...
1answer
219 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 ...
0answers
40 views

### Mathematca terminates internet connection when window is minimized

I wrote a short program which is collecting (and then plotting) data from internet. When I literally don't see, Mathematica stops collecting data and when I maximize window again, it continues. Can ...
0answers
31 views

### Give the result in separate lines

I have the following command Reap[Do[If[GCD[i, 7280] == 1 && Mod[729*i, 7280] > i, Sow[{i, Mod[729*i, 7280]}]], {i, 0, 7280}]] which gives pairs ...
1answer
455 views

### What are SparseArray Properties? How and when should they be used?

A strange undocumented form of SparseArray is increasingly used in answers on this site: ...
3answers
60 views

### Apply every function from a list to an expression

I would like to apply a list of functions to an expression, like ApplyList[{Re, Im}, Exp[I x]] = {Cos[x], Sin[x]} How do I do that?
0answers
102 views

### Discrepancy in the series expansion of $\log(z/(z-1))$ in Mathematica 5

When I calculate the series expansion of $\log\frac{z}{z-1}$ around $0$ in Mathematica 5.2, I obtain: ...
1answer
84 views

### Is it possible to solve a certain set of nonlinear equations in Mathematica?

I read this question in a Chinese forum last year. At the end of the discussion, they provide a solution of the equations from a C++ program. Unfortunately, they did not get the right answer. ...
1answer
126 views

### ParametricNDSolve without initial condition?

For example, ParametricNDSolve[{y'[t] == a y[t]}, y, t, {a}] returns a ParametricFunction which is actually inexplicable: ...
2answers
293 views

### How to make Mathematica show matrices and vectors nicely

It shows me like {{0}, {1}, {0}, {-1}} . Is it possible to make it look like a vector, always?
1answer
89 views

### Animating a Sphere to move along a 3D curve [closed]

How do I get a sphere to move along a 3D function in Mathematica?
1answer
234 views

### Add text or descriptions to Plot

I would like to add some descriptions or qualifications to Plot as follows: Those in black are what I would like to add to my Plot (this graph is manually created ...
0answers
247 views

### Choosing FEM element type and mesh refinement

I have only recently been introduced to Mathematica's(v10.0) FEM capabilities. I understand that for solving PDEs on non-uniform shapes via NDSolve, Mathematica ...
2answers
62 views

### How to print unevaluated arguments in the form they were originally typed in?

I'm looking for a way to print a function's arguments, not only unevaluated, but also in the way they were originally typed in. By way of experimentation, I tried stuff like this: ...
0answers
77 views

### AVL binary search tree implementation

Is there any text-book implementation of self-balancing binary search trees such as AVL or red-black in Mathematica?
0answers
58 views

### How can I have this $\LaTeX$ expression in my Mathematica code? [closed]

I'm trying to make this happen in Mathematica: $\mathscr{G}_{\text{\textbullet}}$ $\mathscr{G}_{\text{\textbullet}}$ I tried ...
1answer
187 views

### Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...

15 30 50 per page