All Questions

Filter by
Sorted by
Tagged with
1 vote
3 answers
24 views

Simplification of complex number factors out an extra i

When I evaluate Simplify[ - a - I Sqrt[3] a - b - I Sqrt[3] b ] Mathematica returns -I (-I + Sqrt[3]) (a + b) Personally, I ...
1 vote
1 answer
15 views

How to create a sequence of functions defined recursively?

I'm trying to create a Table of functions where each new element is defined recursively via indefinite integration of the previous one. I've tried doing: ...
-3 votes
2 answers
34 views

Least norm solution to a set of linear equations [closed]

Suppose I have a set of linear equations $M x = y$ where there are infinitely many solutions. I want to find a solution $x$ with the smallest $l_2$ norm $\|x\|_2$. Is there an efficient way to do this?...
0 votes
0 answers
27 views

Why is my svg image composed of surfaces instead of lines?

I'm trying to export this plot in svg format. However, if you analyze the exported svg image, you would see that they're composed of surfaces instead of lines like this: I suspect that this is the ...
4 votes
3 answers
85 views

How to insert AutomaticNumbering programmatically?

Preamble: I often work with the JournalArticle Stylesheet and use in it the styles "Figure" for graphics and "FigurCaption" for the corresponding caption. The figures should be ...
5 votes
1 answer
61 views

Animating a Sphere Eversion (Turning a sphere inside out)

I'm interested in animating a sphere eversion like the one shown in the following gif. The full video is here: https://www.youtube.com/watch?v=OI-To1eUtuU Normally, I would offer my own code as a ...
2 votes
1 answer
81 views

RandomFunction with a QueueingProcess for more than one service handler hangs, why?

In Mathematica, I want to, say, investigate a M/M/4 queue, that is a single queue with 4 services each handling jobs from that same queue. The arrival rate is 4 and the service rate is 2. I've ...
0 votes
0 answers
22 views

Solution such that an inequality is true in the whole domain

How to find out when an inequality is always true in a given domain? I give an example below. I would want to find $b(a)$ such that the following is always true: $\quad~x + a > bx$, where $0 < x ...
0 votes
2 answers
59 views

Remove Outliers in BoxWhiskerChart

Is it possible to automatically remove the outliers that are detected by "Outliers" within BoxWhiskerChart? Somehow <...
10 votes
1 answer
65 views

Why does one need to restart the PC now after installing V 13.1?

I've installed Mathematica new releases before on my PC. This is the first time it asks to restart the PC at the end of the installation of V 13.1. This is on windows 10. The question is, why in this ...
15 votes
5 answers
857 views

Divide a geometric region by (many) lines

Given a shape (e.g., a rectangle, a circle, etc.), how to divide it by $n$ randomly chosen lines. It is trivial to plot those lines (see figure below), using code like ...
2 votes
1 answer
190 views

How to expand a function as a linear combination of other functions?

I would like to be able to expand certain functions as linear combinations of other specified functions when I know that the original function can be represented in such a way e.g. we know that $\sin^{...
1 vote
2 answers
173 views

How to plot the data where y is a function?

how can I plot the data (x,y)by knowing a and b and x values? x = {0.2, 11, 16}; y = Exp[(-a*x - b*x^2)]; a = {0.510, 0.280, 0.250}; b = {0.380, 0.240, 0.330};
11 votes
2 answers
3k views

FEM: user material subroutines (UMAT in ABAQUS), mechanics

Just a quick question (mainly for those who are also familiar with ABAQUS or other comparable FEM programs and non-linear modelling of mechanical behavior, e.g., plasticity). Is there any module in ...
10 votes
4 answers
364 views

Extract four (von Neumann) neighbors of a matrix entry

Assume I have a $m\times n$ matrix and I would like to extract four neighbors of randomly selected entry of a matrix. I have handled if location is not on the boundary. Any suggestion how to handle it ...
2 votes
1 answer
30 views

Reuse same layer of Neural Network

I hope to wrap up ConvolutionLayer in a way so that it takes two inputs, does the same operation on those, and outputs their result respectively. For example, ...
5 votes
1 answer
140 views

Is MeanPredictionBands synonymous with a confidence interval in Mathematica?

I am a little confused by Mathematica's use of the term prediction interval in NonlinearModelFit. We are given two kinds of prediction bands as an option: ...
8 votes
1 answer
232 views

Inconsistent behaviour between Active and Inactive forms of PDEs (finite element method)

Bug introduced in 13.0 or earlier and fixed in 13.1.0 I have been using the finite element tools in Mathematica version 13.0 to solve eigenvalue problems in physics (Schrödinger equation) using ...
4 votes
1 answer
208 views

Memory use buildup when solving PDE multiple times

Bug introduced in 13.0 or earlier and fixed in 13.1.0 Mathematica V 13.0 Mac OS X ARM (64-bit) - MacBook Pro 13" M1 processor macOS Big Sur 11.6.2 I am solving a PDE numerically and have noticed ...
86 votes
17 answers
4k views

Future enhancements for the finite element method

How should the finite element method (FEM) framework in the language be extended to be more useful? With the release of version 12.0 all fundamental FEM solvers (linear, nonlinear, stationary, ...
0 votes
0 answers
34 views

How to simplify a formula with integrations by parts?

I have a huge expression to compute, which contains lots of different terms composed of multiplication of various functions, derived a certain number of times (non derived, derived once or twice). For ...
0 votes
1 answer
33 views

How to project a 2D region from one plane to another?

I have one of a general set of 2D regions (Disk, Rectangle, Polygon, etc.), as well as 3D origin points and normal vectors defining two reference planes/coordinate systems. I also have a x vector ...
9 votes
1 answer
195 views

NIntegrate can't handle InterpolatingFunction produced by FiniteElement properly?

Bug introduced in 12.3.1 or earlier and fixed in 13.1.0 This is a problem comes out in the discussion here and I think it's worth posting a new question for it. Consider the following sample: ...
2 votes
1 answer
105 views

Why does SolidMechanicsStrain calculated inside a module give strange results?

Bug introduced in 13.0 and fixed in 13.1.0 I am exploring the FE capabilities of Mathematica and trying a few solid mechanics problems with the aim of bringing them into my teaching. The problem is a ...
0 votes
0 answers
10 views

How to measure a LearnedDistribution?

I would like to measure the qualities of a LearnedDistribution in general and with regard to test sets. The docs say that it takes an option ValidationSet, but ...
26 votes
3 answers
2k views

How to simulate the true reflective movement of a particle bouncing around in an ellipse?

Please help me to simulate the movement of a particle inside a region with elliptical walls such that particle is reflected from the walls and continues to move. A friend was able write code to ...
-1 votes
0 answers
40 views

efficient code to search for formulas for calculating primes

I had an idea for calculating primes using smaller primes given the following: p1=(p2-p3/p4)+(p5-p6/p7) where p1>p5>p2 and p2>p3>p4 and p5>p6>p7 and p1 through p7 are all prime ...
2 votes
2 answers
187 views

Convert image of roads to 3D graphics

I have images like this: and I want to convert those lines to 3D graphics so I can export it as OBJ or STL. My best attempt has been by using MorphologicalGraph (following this post) and doing: ...
2 votes
1 answer
191 views

How to dilate binary image from outside-to-inside?

I have a binary image of a line, like this one: What I'd like to do is to dilate the line, but only towards the 'inside' of the line. That is, to add white pixels towards the center of the image, ...
3 votes
1 answer
29 views

Plotting a table with one x-value and multiple y-values

I have a table which reads ...
0 votes
0 answers
25 views

Calling Mathematica functions from Node js project. Similar to .NET by making Mathematica Kernel? [closed]

How to call Mathematica functions from my Node js project? Is there any way I can do it like we do in .NET by making mathematica kernel?
1 vote
1 answer
61 views

Create grid-like Image3D

I would like to create a visualization of a volume with the help of equally-spaced grid lines. The effect I want to get is easily obtainable for 2D images, the image is simply divided into quadratic ...
0 votes
1 answer
61 views

How to add arrowhead for axes in frame?

How can I add arrows for axes of frame? This works well if there is no frame but it doesn't work when I added frame. ...
1 vote
0 answers
65 views

Suggestions to simplify and perform the summation of a complicated expression

I have a very complicated expression involving Hermite polynomials of complex variables, exponential and hyperbolic functions. Since it is too long to be pasted here, you can find the expression here. ...
10 votes
3 answers
2k views

Change integration variable

Are there any automated procedures to change integration variables? For example by changing Sin[u]->x, I can change ...
10 votes
3 answers
4k views

How to change coordinates of integration?

Is there some built-in routine, some easier method to change variables of integration, without/before solving the integral? Say I have ...
10 votes
6 answers
4k views

Is there a way to rewrite integrals in Mathematica using u substitution?

In Mathematica, can I give it an integral and a few substitution rules and have it rewrite the integral in terms of those variables?
1 vote
1 answer
39 views

Channel-Based Communication and MQTT?

it seems to me that with the Channel-Based Communication a "subscription" of a private MQTT-Channel should be possible especially Wolfram mentioned that one can commit the MQTT-Path like ...
3 votes
2 answers
47 views

How can I flip/mirror the legend? [duplicate]

How can I flip/mirror the legend like this? The text should be right aligned and if the text is longer than the text move to the left. ...
1 vote
1 answer
74 views

Weird Infinite Limit results when dividing functions

I am getting 0 or 1 for the limit when dividing the two functions but Log of the same constant when taking the limit individually. ...
0 votes
1 answer
52 views

How to execute Wolfram Language code/scripts in R Studio (or similar)?

How to execute the Wolfram Language in R Studio?, or similar. https://www.wolfram.com/wolframscript/?source=nav
0 votes
1 answer
155 views

Solve for p of Binomial distribution

Is there a way to solve for the probability p of a binomial distribution in a set of equations? With some arbitrary functions g[ _ ] and f[ _ ] such that: ...
1 vote
0 answers
25 views

How to middle align text and the markers and place the legends for this?

How can I middle align the legends and markers? Changing the font size make it not aligned. ...
2 votes
0 answers
45 views

How do I import a file only when it is modified?

I am trying to create a Dynamic code that will Import the contents of file only if it has been modified. I tried the following ...
1 vote
1 answer
110 views

Trouble when attempting to import a dat resource

I am trying to import the "Patient Medical Data for Novel Coronavirus COVID-19" dataset from the Wolfram Data Repository, but when I import, it shows me just 427036 results instead of the ...
1 vote
2 answers
42 views

How can I collect the sum of any number of gradients without using ReplaceRepeated[]?

Recently, I have run into the problem where I need to collect the the sum of any number of gradients. I have defined a function grad[] to represent the gradient, ...
3 votes
1 answer
148 views

Pushing Mathematica's FullSimplify to a global complexity minimum

Original: Is there any way to control Mathematica's inner simplification algorithm? I have seen several instances where FullSimplify does not yield the most optimal ...
1 vote
1 answer
59 views

How can I calculate the diameters from the craters in this image?

I am new to Image Processing and I want to know a way to find the diameters of the craters.
0 votes
0 answers
39 views

Compile and QPochhammer Function

I am running into trouble trying to make a listable function run in parallel. Arguably, the function that I am trying to compile is rather complicated. Whenever I run the code below ...
5 votes
1 answer
123 views

Finding eigenvectors of a symbolic matrix

I have a $2\times 2$ symbolic matrix for which I want to compute the eigenvalues. It is given as: Clear[a, b, m] m={{a, b}, {b, -a}} and it spits out the ...

15 30 50 per page
1
2 3 4 5
1688