All Questions

2
votes
0answers
33 views

The function VertexContract does not work in specific case

I am using the function VertexContract and I am experiencing that it does not work in some specific cases. If I give the graph with EdgeWeights, EdgeLabels and VertexLabels, I cannot contract {2,5} ...
1
vote
1answer
32 views

Putting legends within the frame of the plot at the desired position

dat1krafull = {{1.`, 2.61594`*^-8}, {10.`, 7.10017`*^-9}, {50.`, 2.1565*^-9}, {75., 1.6567...
1
vote
1answer
37 views

How can I plot the 3D diagram of x[t], x`[t] and a parameter ηb as the three axes?

I have ploted a 2D diagram with ParametricPlot for the equations. The codes ...
8
votes
2answers
183 views

Pairwise Scatter Plots with Histograms and Correlations

Has anybody written a function which can scatter plot data with histograms and correlations? Here is an example form MATLAB. This is related but does not print correlations. R has a similar function. ...
6
votes
2answers
106 views

Visualizing only the chain of a protein and color each residue in Mathematica

Is there a way to visualize in cartoon a single chain of a protein using ProteinData and color the residues by its chemical properties e.g. hydrophobicity, acidic and basic ? The issue here is that I'...
3
votes
1answer
65 views

Generating all connected graphs from a set of n-valent vertices?

I would like to have a function generateConnected[list_] that, given a set of vertices with pre-defined valence (number of outgoing edges) generates all possible ...
0
votes
0answers
81 views

How can I plot a growth curve? [on hold]

How would I draw a plo4 of the function $\qquad dN/dt = r\,N(t)$ in Mathematica? $N(t)$ is the number of individuals in the population at time $t$ and $r$ is the growth rate.
1
vote
1answer
50 views

Interpreting the solution for a nonlinear system in a matrix form

I have an issue of how to interpret the solution of the following nonlinear system in a matrix: $F=PX^{-1}AX+wL$ where $w>0$ is a scalar, $F=(F_1,F_2)$, $P=(P_1,P_2)$, and $L=(L_1,L_2)$ are all a ...
4
votes
1answer
98 views

Making an Email Address Validator

I wanted to make a simple email address validator using StringMatchQ. This was my first attempt: ...
4
votes
2answers
98 views

How do we optimise double Tables?

I have made the following code which I shall explain it in two parts: First Part: ...
0
votes
0answers
20 views

Numbers not multiplied out in the numerical expansion

I have a Mathematica notebook file with some functions that I need to evaluate numerically. However, for some values of certain variables Mathematica does not give me a result as just one number, but ...
1
vote
0answers
31 views

How to filter audio to get best results in correlation?

I am trying to recognise the alphabetical letters by saving some data of records of me and others saying each letter, then comparing a test audio not contained in the data to each letter using the ...
0
votes
0answers
45 views

Mathematica suddenly became extremly slow (Windows 10)

I restarted my computer, and Mathematica became eeeextremly slow. It takes like 5mn to make calculations it used to do in 3seconds. I have seen Suddenly mathematica is very slow when screen is ...
2
votes
1answer
64 views

How to read in and assign values from a txt file?

I have a text file that I would like to import into Mathematica - after searching around the internet, I can't seem to find any pages that explain how to do this: The text file containes these four ...
8
votes
2answers
693 views

How can I get edges to bend to avoid crossing?

I want to generate a layered drawing of the Hoffman–Singlelton graph. As an example of what I want, here is a layered drawing of the Petersen graph: Now if I right click on the output of ...
0
votes
2answers
27 views

Change input filename according to ticker

I want to import a series of files with similar filenames that change according to a "ticker". An example is filenames A1_data.dat, ...
2
votes
1answer
38 views

Gyrating particle transmission through rectangle: NIntegrate or something faster?

I need a function that tells me, what transmission a gyrating particle has through a rectangular aperture if you consider all phase angles. So for a specific guiding center position and gyration ...
3
votes
3answers
90 views

How to find maximum/minimum in `ContourPlot`?

The ContourPlot of Sin[x^3 + y] - 2 Cos[x y]==0 has a maximum around (-1.8,-2.3), see figure ...
0
votes
2answers
56 views

Create an array whose index are given by a list (not necesseraly regularly spaced)

I would like to create an array f containing n indices. The label of those indices is stored in a liste of length n, let's call it "list". So I would like to have something like : {f[list[[0]]], f[...
0
votes
1answer
50 views

How does one use NSum within NIntegrate properly?

If I use symbolic integration for the following: Sum[Integrate[i + x, {x, 1, 7}], {i, 1, 7}] 336 as one can see it gives the answer as it seems to '...
2
votes
2answers
122 views

Finding the radius of a circle given that it is tangent to both axes and contains (10, 9)

A circle is tangent to both axes in the 1st quadrant of the xy-plane. If the point (10, 9) is on the circle, what is the circle radius?
1
vote
1answer
68 views

Why is an empty plot produced?

I am trying to plot the values of the functions f[x] and der[x], but I am getting an empty plot. I am new to both Mathematica ...
10
votes
0answers
98 views

How to link C++ code through the new compiler in V12?

The Advanced Compilation Topics talk in the WTC 2018 shows that one can easily link C++ code through the new compiler technology. This feature seems very useful as one can easily load existing C++ ...
0
votes
0answers
4 views

Find the shaded part area? [migrated]

Two squares of side 5 and 2 respectively. They are touching each other. Diagonals of the square are joined. find the area of the shaded part?
0
votes
0answers
60 views

Not getting expected answer for double integral [on hold]

When the Mathematica processes the expressions shown below, the result is 0, That is not the correct answer. Please help me understand what the problem is. (0 < x and z < 1) https://1drv.ms/u/s!...
0
votes
0answers
53 views

Need help in understanding what Extract does

Can anyone explain two examples from the Mathematica Documentation Center reference page on Extract? One is: ...
0
votes
0answers
31 views

Splitting large matrix in neural network

I'm trying to make a neural network that takes a 16x100x100 matrix and splits it into each 100x100 part, puts each through a dense layer, and then puts them them together once again to form a 16x10x10 ...
1
vote
1answer
37 views

Error with NSum : it returns NSum::nsnum: Summand (or its derivative) f[n] is not numerical at point n=17

Consider the following example (I had a lot of trouble to find a minimal working example, I think it is compactified enough now). ...
0
votes
1answer
46 views

Calculation of the average of the values of a column in a matrix

I am trying to have a list of values which corresponds to the mean of the values of each column of a matrix. Here I show a quick example (my current matrix has a dimension of 1000 * 1000) If I have ...
1
vote
0answers
32 views

Alternatives for chromatic number in graphs

The function IGChromaticNumber in IGraph works great, so well, that I have been able to check the chromatic number of graphs with max degree 12 with over a thousand vertices in a relatively short ...
0
votes
1answer
27 views

Simplest way to export (and import) definitions?

Consider I have this code : f[1]=2 f[1.5]=6 f[3]=4 What is the simplest way to save the array f defined on those three numbers in a file ? (in my case, I will ...
2
votes
2answers
129 views

Compute unstable integral with high precision

I want to calculate $$ \int_{\mathbb{R}^n} e^{-t_1^4-t_2^4- ...-t_n^4-(1-t_1-t_2-...-t_n)^4} \text{d}t_1 \text{d}t_2 ... \text{d}t_n $$ with the highest possible n. I tried with ...
0
votes
0answers
23 views

Is it better to convert numerical integrals into numerical sums?

I sometimes deal with integrals that can't be solved analytically to give a closed-form expression, but that can be converted into infinite sums instead. Is there a general rule about whether ...
2
votes
0answers
46 views

Why doesn't ClearAll[“Global'*”] remove all variables? [on hold]

Consider the following code : In[19]:= a = 2; In[20]:= ClearAll["Global'*"]; In[21]:= a Out[21]= 2 As you see, the variable a hasn't been resetted. Why ? ...
1
vote
1answer
35 views

Stacked Bar Chart with a bar showing the forecasted quantity and the real quantity as the part of this bar

I was looking for a way to make a stacked bar chart, where a bar shows the forecast and the real quantity as the part of the forecast. So, if the forecasted quantity is 10 and the real quantity is 5, ...
14
votes
3answers
725 views

Generate and graph the Recamán Sequence

I was surprised to see that we don't have any posts that mention the Recamán Sequence, so I figured I should post it as a challenge. By definition, $a_0=0$ and $a_n=a_{n-1}-n$ if the r.h.s. is ...
1
vote
1answer
56 views

Parallelization command possible bug

In the following Mathematica compiled program, 3 persons take turns in a fair Russian Roulette Game with 1 bullet in the 6th chamber and we find the probabilities of each person being killed after 1,...
2
votes
3answers
66 views

One plot with different density functions in different regions?

As you can see in the following photo, there are 4 regions in the photo. Each photo has a different density function $T_i$. For ① $T_1=223+380 x+385y$ For ② $T_2=446+1080x+450y$ For ③ $T_3=108+...
2
votes
1answer
42 views

How to add the peak labels to an FTIR spectrum?

I have tried to plot the next FTIR spectrum and add their respective peak labels using Graphics and Show, but I think this doesn'...
2
votes
2answers
94 views

Flow over the circle

I'm trying to plot a vector field over a circle, Particularly the vector field in this plot: ...
-2
votes
0answers
53 views

How do I solve my system of PDEs? [on hold]

$ρ, µ, c$ and $k$ are all functions of the nanoparticle volume concentration
0
votes
1answer
56 views

Is it possible to use FindRoot with a function of two variables? [on hold]

How can I use FindRoot with 2 variables function? Is there a different way to do that? For example ...
3
votes
4answers
310 views

How can I simplify $\lim_{n\to \infty } \, \int_0^n e^{-x} \left(1-\frac{x}{n}\right)^n \, dx$?

How can I simplify $\lim_{n\to \infty } \, \int_0^n e^{-x} \left(1-\frac{x}{n}\right)^n \, dx$ ? Limit[Integrate[(1 - x/n)^n/E^x, {x, 0, n}], n -> Infinity] ...
3
votes
1answer
33 views

How to split overlapping values from different axis?

There are overlapping numbers in the plot below (the left down corner). The axis $T_e$ has the value $10^{0}$, and the axis $n_i$ has $10^9$. But the problem is that the values are imaged in the same ...
0
votes
1answer
34 views

Conditions to make unitary a given matrix

Suppose I have some symmetric matrix W = {{c[1, 1], c[1, 2], c[1, 3]}, {c[1, 2], c[2, 2],c[2, 3]}, {c[1, 3], c[2, 3], c[3, 3]}}; where the c's are complex and I ...
4
votes
3answers
463 views

How do I find and plot the intersection of these three surfaces?

I know how to find the region of intersection of these cylinders using integration, but how would I plot that in mathematica? This is what I have ...
0
votes
0answers
88 views
+50

Aligning plot axes of multiple figures results in different size of the FrameTicks

I defined a new FrameTicksStyle, but their size is changed when more than one figure are stacked vertically. However, the size is accepted when figures are stacked ...
0
votes
1answer
53 views

Correct double distribution function for the following dataset

Consider a dataset data-angles-gamma-factors.txt having the form {{x1,y1},{x2,y2},...}. Each row represents an event with values x,y; all events have the equal ...
0
votes
0answers
54 views

Does SystemModeler have a spark gap among its analog electrical comonents?

I'm crafting a circuit to simulate, etc, and I can't find any spark gap component in its library. How could it be custom designed, or imported, if it's missing from the library? In the alternative, ...

15 30 50 per page