All Questions

Filter by
Sorted by
Tagged with
4
votes
3answers
147 views

NDSolve will try solving the system as differential-algebraic equations but it didn't get the solution

Please help me deal with this kind of question about ODEs. My codes are as follows ...
3
votes
1answer
95 views

Why doesn't DeleteDuplicates do what I want

First off. I am not a mathematician I am a linguist, a syntactician who is trying to say something about semantics, which in the case at hand can be largely understood to reduce to set theory. That ...
1
vote
1answer
91 views

Simplify seems to give wrong result [closed]

I have an very long expression named "Bug", which is made by different precision numbers. When I directly apply Simplify, it seems to give me a wrong result. However when I apply SetPrecision to set ...
14
votes
2answers
304 views

Convert symbolic to numeric code: speed up morphing

Recently I asked a question about the morphing between two functions and got two excellent answers. The accepted answer is using the continuous optimal transport theory. This seems to be very suitable ...
4
votes
1answer
78 views

Is it possible to get current thickness for every Line, Polygon, Circle object in a plot?

When exporting Mathematica graphics to raster formats with high resolution the common problem is that thickness for such objects as Line, ...
1
vote
1answer
38 views

Confusing behavior of LQR control that strongly depends on system output (with odes solved by NDSolve)

I am implementing a LQR control of a 3-floors structure. Firstly, I obtained a reasonable result with my first code (Code 1 as shown below). In this code, the ...
0
votes
0answers
27 views

Can't modify “Kernel Configuration Options”

Immediately after adding a kernel using the Evaluation --> Kernel Configuration Options, I cannot further modify the list of kernels in that configuration panel (...
1
vote
1answer
48 views

Visualizing a system of differential equations [closed]

I have the following system of differential equations: x'[t] == x[t] - x[t] y[t] y'[t] == x[t] y[t] - y[t] I use this Wolfram Mathematica code: ...
0
votes
1answer
31 views

Order of evaluation of variable

I'd like to control the order of evaluation in a multi-variable function. Example: Suppose I have the function: B[x_, y_] := x + y/x; If I try to evaluate ...
0
votes
1answer
28 views

I need to extract data from a multi-valued functions and interpolate them into separate single values functions

The graphed data look like this. I need to extract the data for each curve individually and use Interpolation to create a differentiable function for each curve. Can you show how to do this? I will ...
0
votes
1answer
59 views

pHow can I reposition the axes of a 3D plot? [closed]

I'd like to reposition the axes in my plot of a surface. Please consider the following code: ...
1
vote
1answer
44 views

How to extract and plot pieces of a multi-valued function

I have multi - valued functions that create lists of data like this: ...
1
vote
1answer
59 views

Indefinite Integration of real-variable function gives complex logarithm [closed]

Integrating real-variable function in Mathematica Integrate[1/Sqrt[2 x - x^2], x] gives following output with complex logarithm $$ \frac{2 \sqrt{x-2} \sqrt{x} \...
3
votes
1answer
105 views

How do I plot a 3D surface on top of a 3D plane?

Consider, as an example, the Shannon entropy of probabilities defined over three possible outcomes: $$H(p_1,p_2,p_3)\equiv -p_1\log p_1-p_2\log p_2-p_3\log p_3.$$ I want to study the behaviour of $H$ ...
5
votes
3answers
131 views

Moments of Multinormal in symbolic form

Gaussian expectations often simplify (20.5 of Seber's "A Matrix Handbook for Statisticians" gives many examples). I'm wondering if there's a way to use Mathematica to produce the formulas semi-...
0
votes
1answer
49 views

How to generate a list with elements f[i] for a function of several variables f?

I would like to create an array of length n with each element i equal to the function ...
0
votes
0answers
48 views

Dealing with positive power variables in Taylor expansion and assumptions

I would like to compute the Taylor expansion of monomials whose powers are nonnegative rational variables. First, here is a function which encodes the multivariate Taylor expansion at the points <...
2
votes
1answer
109 views

Extract values of a ListAnimate plot that are moving at a fixed rate

I have this code which animates a layer of fluid moving on the outside of an ellipse with a moving black point on the cylinder surface itself. Is there a way to find the value of the blue outer line ...
3
votes
1answer
76 views

Efficiently computing current flow betweenness centrality for graphs

Definitions: Given a graph $G=(V,E),$ the current flow betweenness is a node-wise measure that captures the fraction of current through a given node with a unit source (s) sink (t) supply $b_{st}$ (1 ...
0
votes
0answers
61 views

citing with endnote x9

I am trying to cite my work with endnote x9 by following insert->citation->bibliographical reference. but the citation panel is empty. before you ask, first i opened EndNote and then Mathematica v12. ...
0
votes
1answer
57 views

Approximating missing data points in a list using fit models [closed]

Suppose I have the following list: l={0, 76, 413, 942, 1344, 1651, 1486, 1013, 581, 237, 65, 17, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} I want to find a fit ...
1
vote
1answer
42 views

Formatting output for use in forums etc [duplicate]

If we take the (simple) example x = 1; y = 2; z = 3; x + y + z we get the (complete screen) result when copying into a more basic interface, such as a web forum ...
5
votes
1answer
110 views

A list has been obtained from an outside soft (from COMSOL - to Mathematica). Let us make a continuous function out of it

Using COMSOL I have solved an equation. The solution in the form of nested list with the term {x,y,z} is here. This ...
1
vote
1answer
86 views

Bifurcation diagram

I have a differential equation y''[t] + 0.3*y'[t] - y[t] + (y[t])^3 == A*Cos[114.14*1.2*t] with y'[0] == 0, y''[0] == 0 t varies from 0 to 1500, A varies ...
0
votes
0answers
34 views

Indentation is lost in Mathematica packages [duplicate]

This might be very trivial to fix (in that case I'll just delete the question), but why when I save a Mathematica notebook as package, the indentation is completely lost and when I edit the package ...
10
votes
2answers
488 views

Morphing between two functions

Assume we have 2 peaked positive functions f[x_] := Exp[-(x + 3)^2] g[x_] := 1/2 Exp[-(x - 3)^2/4] that look like Would it be possible to numerically find a ...
0
votes
1answer
55 views

How to flatten a tensor product

Say I have a tensor product of four two dimensional spaces $\Lambda = S\otimes S\otimes S\otimes S$. The basis of $S$ is CB={{1,0},{0,1}} . I generate the ...
0
votes
0answers
30 views

Series expansion of explicit functions

For the following input, zv[u_, v_] := v + zv1[ u, v]/u; mvu[u, v] := D[zv[u, v], u]; Series[mvu[u, v], {u, 0, 1}] the output is ...
0
votes
1answer
35 views

Delete element from list [closed]

I have a list with 1000 elements, and I want to delete all elements from index 400 (including) until the last element.
7
votes
1answer
147 views

Curved Dirichlet boundary in FEM

Based on this fascinating blog post (https://blog.wolfram.com/2013/07/09/using-mathematica-to-simulate-and-visualize-fluid-flow-in-a-box/) from a few years ago that shows how to simulate a driven ...
0
votes
0answers
41 views

Why the Opacity[] looks not work on my PC?

Help: Why the Opacity[] looks as a failure when I run it on my PC? How to do? The following figure is a code line in the Help. The left side is the result, and the transparency effect is not obvious, ...
0
votes
2answers
38 views

Reduce spacing between legend entries using Show

I am creating two plots and using Show to overlay, however the legend has a very large inter-line spacing. This answer suggests using Image Size but my legend is not a separate graphics object. This ...
0
votes
2answers
48 views

How to Index in TableForm

Why are the k-values 0,10 not showing in the TableForm below? ...
5
votes
3answers
354 views

How to calculate an infinite sum to 100 exact digits with NSum?

In the discussion https://math.stackexchange.com/a/3419778/198592 I stumbled of the question how to calculate the sum $$s= \sum _{n=3}^{\infty } \frac{n \cot \left(\frac{\pi }{n}\right)}{4^{n-2}}$$ ...
0
votes
0answers
21 views

Fitting B-Spline to the data and Plot the curve error

I am trying to fit B-Splines to the data given and plot the curve on the same graph with the data. My end goal is to use my B-spline in order to predict the value f(750). Although, nothing is running ...
1
vote
0answers
42 views

internal Neumann boundary for FEM

Following the documentation for NeumannValue (https://reference.wolfram.com/language/ref/NeumannValue.html) gives the impression, that it is only possible to set ...
6
votes
2answers
135 views

How can I use Callout to label the segments of a piecewise function?

When I plot a Piecewise function, I like to put the function name above each part of the plot. I could not find a way to use ...
0
votes
1answer
44 views

Trouble generating a table from a Do function [closed]

Basically i have this function that computes several partial derivatives for every value of alpha, beta, and gamma as it sums delta from 1 to 4. It gives an output for every value straight down the ...
1
vote
1answer
35 views

Singularity or stiff system in NDSolve

I have the following piece of code ...
1
vote
1answer
84 views

How can I generate a histogram for the largest strongly connected component of a directed graph?

With the help of several persons from this forum, I have written the following MMA Code using Manipulate to describe certain ...
0
votes
1answer
47 views

Why are “Computation result” and “Decimal approximation” so different?

I am performing the following integral: SetPrecision[integrate(1*x^(1 - 1)*Exp[-x^1] * log(1*x^(1 - 1)*Exp[-x^1]/((e^(-x) + 10*e^(-10*x))/2)), x= 0..infinity), 50] When I do this on Wolfram ...
8
votes
1answer
438 views

How can I find a parametric equation for an implicit surface?

I need a parametric equation for the Taubin heart surface, which is defined in implicit form. I asked a similar question in math branch, but didn't get an answer. This is the implicit form: $$\\\...
10
votes
5answers
498 views

Grainy 2D RegionIntersection Plot: How can I make it smoother?

I have the following code to display three coloured disks and their coloured intersections. However, the result does not appear to have been anti-aliased enough. How can I make it smoother? ...
1
vote
1answer
52 views

How to address an element of variable vector for coupled system of ODE while using NDSolve

I am using Mathematica from around 10 months. I want to solve numerically a system of equations with number of equations more than 35 to 40. System of equations is shown below for small number of ...
3
votes
1answer
59 views

MaTeX stopped accepting certain font sizes

My system: Windows 10, Mathematica 11.2 Problem: I have been using the fine MaTeX paclet to get nice symbols on my plots. As I scale the images in a TeX-document after exporting them in EPS, I need ...
1
vote
1answer
50 views

Contour plot from list of 4D points

I have tried everything I think but I could not obtain a 3D contour plot from a list. Here is my code. Could you help me find the mistake I made? ...
0
votes
0answers
99 views

How can I analyze image colors expressed in the CIELAB L-a-b model? [closed]

I have a database of colors in L-a-b format. I want to analyze how many colors there are [in an image (??)], and I want to know the quantity of each color that it contains. For example: I want this ...
6
votes
2answers
252 views

How to draw a 3D point moving along a helical path?

I have an animation for a helix being drawn in 3D but I really want to have a point on there that draws the helix. I've seen similar problems on here for 2D and I tried adapting the suggestions but I ...
0
votes
0answers
17 views

xAct: partition set of indices

In my example the manifold M is a Lie group G, say generated by generators {T_A} of the corresponding algebra and I would like to be able to expand the Lie group G into those of a subgroup H, say {T_a}...
7
votes
1answer
100 views

Partitioning a list by cumulated sum when the accumulate reaches a fixed value

I have a list dat = {10, 10, 10, 10, 10, 40} . When the cumulative sum of dat reaches >=...

15 30 50 per page