All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
37 views

Create New Type of Layer For Neural Network

I'm doing some work exploring modelling neural networks in which each neuron could represent a different type of physical system. What I want to do is, I think, quite different to what an ordinary ...
0
votes
1answer
34 views

Problems in optimizing a function over two variables

The following function needs to be maximized over the variable $a1$ and $a2$ in the range $0 \le a1 <1$ and $0\le a2 <1$: ...
3
votes
2answers
126 views

Problem with FindFormula for experimental dataset [closed]

I have a dataset whose mathematical model is unknown. There is my code. ...
3
votes
3answers
104 views

How can I solve a Set Cover problem in Mathematica

I have $n$ non-empty possibly non-disjoint sets $S_i$, each having a cost $c_i$, and the union $\Omega=\bigcup_{i=1}^{n}S_i$. How can I find a selection of $S_i$ such that the union is also $\Omega$ ...
4
votes
2answers
118 views

How does `DirichletConvolve` relate to Dirichlet convolution?

Mathematica's Help documentation on DirichletConvolve is economical, to say the least. It claims the function "gives the Dirichlet convolution of the ...
0
votes
1answer
82 views

State Covid-19 cases

The aim of the function below is to take a state US s and county c and return the total number of covid-19 cases. ...
2
votes
2answers
96 views

How can I configure both Mathematica and the FrontEnd (whatever it is) to use the directory of the current notebook when saving/exporting graphics?

My system: Mathematica 11.2, Windows 10 Problem: I am (perpetually) working on my lecture notes, adding graphics produced by Mathematica. Obviously the notebooks I created for this purpose are in the ...
0
votes
1answer
33 views

Why is my dynamic slider no longer working?

This used to work but I accidentally made some unrecoverable edits and it stopped displaying. It supposed to adjust the background color of the current notebook. Please have a look and see what is ...
2
votes
1answer
48 views

Issue with Option Filling -> Axis

In mathematica 12.0, the following code ...
0
votes
0answers
28 views

How do I add the carriage return at the end each line?

I am working with SRIM. It takes as input, files each of whose lines end with the carriage return and line feed characters (respectively #13 and #10 ASCII characters) as said in the tutorial (page 15):...
4
votes
2answers
120 views

Calculate combined standard deviation

If I have a data that I fit with NonlinearModelfit that fits a data based on two fitting parameters, c1 and ...
3
votes
1answer
87 views

What are some debugging helpers or tips/tricks in your Mathematica toolbag?

I am a novice so imagine my confusion with Mathematica's very poor error and trace messages. Debugging should be an easy thing to do even for beginning programmers but not with Mathematica. What are ...
0
votes
0answers
21 views

Please help validate autoSave function or refactor for better performance

I finally have my autoSave[] function that appears to work. Although it does automatically save file the DateString (dynamic in-...
0
votes
0answers
32 views

ListPlot 3 column data file

I have a 3 column data file x,y,z. I want to plot y vs x in the plane, taking z as lateral color bar. I tried ListDensityPlot[{x, y, z} // Transpose] but did not ...
3
votes
1answer
74 views

Two-color HatchFilling

Is there an easy way to make HatchFilling use two alternating colors? E.g. ...
0
votes
0answers
17 views

How do I open and use(run) an Interactive Demonstration locally with Wolfram Player

I have multiple Macs, run a full Mathematica on one, and am trying to use the free Wolfram Player on another. Wolfram Player is installed and is version 12.1--the latest. See https://www.wolfram.com/...
2
votes
1answer
35 views

Launch PDF viewer from within a Mathematica Notebook

I would like to view a designated PDF document by clicking on a hyperlink in a Mathematica notebook. I am able to open the designated PDF document using SystemOpen["E:\OneDrive\Learning ...
0
votes
1answer
56 views

Counting real roots of bivariate polynomial

For a proof, I'm working with a polynomial $p(x,m)$ and I need to show that: For any $m\in (0,6)$, $p_m(x)\equiv p(x,m)$ has a unique real root in $(0,1/2)$. I find that this is true by using Reduce ...
0
votes
1answer
46 views

Define a Region where a disequation is satisfied for all values of a variable

I'm having a problem with Mathematica. I have a large and complicate system of 3 inequalities in 3 variables, let's call them x,y,z. Now, I can't use reduce to solve it exactly. There is a way to ...
6
votes
3answers
106 views

How to get elements corresponding to UpperTriangularize

For a generally non-square matrix M, I want the upper triangle that include the diagonal entries. Specifically, this is implemented via UpperTriangularize: ...
1
vote
2answers
56 views

How to use StreamPlot to plot the typical solution in this directional field?

How can I plot the typical solution in this directional field using StreamPlot? ...
5
votes
2answers
122 views
+100

Curl analog with URLRead/Execute?

I have a working curl command: curl https://myapp.herokuapp.com/doit -F filedata=@path/to/img.jpg How do I write this in the modern way with ...
1
vote
0answers
43 views

Making Table with nested SetDelay functions is very slow

I am trying to write a function which returns a list of lists of eigenenergies available for a quantum well. The code is here: ...
0
votes
0answers
55 views

is Epidemic Data For Novel Coronavirus COVID-19 not updated?

I am trying to get the epidemic data of Colombia and I encounter that since May 27 there is not information about. The data which I obtained is ...
0
votes
2answers
63 views

Plot implicit polar equation streamlines

I'm trying to plot streamlines of Stokes solution to an sphere, the expression of streamlines is I've seen similar questions before and this what I have tried As you can see, a=1, U=1, but it seems ...
4
votes
1answer
156 views

Double summation

Can Mathematica compute a double sums such as: Sum[If[m == n == 0, 0, 1/(m^2 + n^2)^3], {m, -∞, ∞}, {n, -∞, \ ∞}] The analytic expression can be found in https:/...
0
votes
0answers
42 views

How to calculate with right probabilities values?

My code solves the equation G(Ht) using random p probabilities for each value of d in my <...
0
votes
0answers
62 views

Why are Solve and LinearSolve returning different solutions here?

I'm working on a problem which requires me to take some numerical data I have from previous work, and use the data in the construction of new equations which I then have to solve. I can set up the ...
1
vote
2answers
58 views

How to get rid of imaginary part in cubic root

When I try to solve the following cubic equation for $a$ on mathematica : S=Solve[a^3 - 4 x - 2 a^2 x + 8 x^3 + a (- 6 - 4 x^2) == 0,a]; I get a complex expression ...
1
vote
0answers
17 views

Is there a way to count quantity of evaluations (this preferred) or edits in a cell since last notebook save?

Abstract The goal is to use this to create an autoSave[evals_:5]:=Module[{}, save after set number of evaluations or edits have occured...]. I asked a similar ...
0
votes
1answer
63 views

Restrict gaussian multi-peak fitting by area

I am trying to implement the code developed by @MarcoB here: Multi-peak fitting and area of the fitting but trying to restrict the fitting of the peaks by the area, height, the width and the position, ...
4
votes
3answers
233 views

How do I convert a list to a Graph with directed edges?

I created a discrete Markov process using p = DiscreteMarkovProcess[{1, 0, 0}, {{0, 1/2, 1/2}, {1/2, 0, 1/2}, {1/2, 1/2, 0}}]; and simulated it 5 times to create a ...
0
votes
1answer
39 views

Fitting an integral function given a set of data points

I have a set of measures of the resistivity of a given material at different thicknesses and I'm trying to fit them using the Fuchs-Sondheimer model. My code is: ...
2
votes
1answer
36 views

DecompositionNDSolveValue analogue for NDEigenvalues

In FEMAddOns there is a function DecompositionNDSolveValue to solve stationary PDEs on a cluster. Is there a similar way to solve the eigenvalue problem for a system of ODEs in parallel kernels, ...
1
vote
1answer
39 views

Issues arising when using UnitSimplify for getting a dimensionless expression

I am having some difficulties when using UnitSimplify in manipulating expressions for obtaining dimensionless quantities in Mathematica 12.0.0. Here is a minimal ...
4
votes
1answer
120 views

MeshRefinementFunction analogue for ToElementMesh

MeshRefinementFunction according to the documentation is an option for DiscretizeRegion. Is there an analogue for ...
1
vote
1answer
45 views

Scan and Set over multi-dimensional data

Suppose I have the following: Table[x[i,j] = f[i,j], {i,1,10},{j,1,10}]; I want to set variables x[i,j] to have value ...
4
votes
1answer
68 views

Openning JSON file, (NDJSON, new line delimited) — big file

I am trying since many hours to open a JSON file ("new line delimited") that has this as structure ...
0
votes
0answers
69 views

solve $\int x^{-c} \left( 1 + y(x)^2 \right)^{-\frac{a+1}{2}} dy$ where $e^y = x^c + bx$

I am trying to make some progress on solving the following integral: $$\int_{-\infty}^{\infty} x^{-c} \left( 1 + y(x)^2 \right)^{-\frac{a+1}{2}} dy$$ with $y(x)$ defined as $$e^y = x^c + bx$$ for $a \...
3
votes
2answers
44 views

Evaluation of Graphics3D transforms [duplicate]

I want to find the centroid of a graphics primitive after a series of rotation and translation transforms. But it seems that graphics transforms don't "evaluate". For example, ...
6
votes
1answer
366 views

Why can't I create {a,a,a,b,b,b,b,b,c,c} from x={a,b,c}; f={3,5,2}; Thread@Table[x,f]?

ClearAll[x, f] x = {a, b, c}; f = {3, 5, 2}; Thread[Table[x, f]] produces Table::nliter: Non-list iterator f at position 2 does not evaluate to a real numeric ...
1
vote
2answers
41 views

Combine image with URL into one image

I have images from the internet and the corresponding URLs. I want to combine the image and the URL into one image. I don't want the URL to be placed over part of the image, but want the URL under the ...
4
votes
1answer
137 views

Solving pde with boundary integral constraint

I want to solve a PDE of the form: $$\frac{\partial}{\partial x}\left(C_1(x,y)u(x,y)\right)+\frac{\partial}{\partial y}\left(C_2(x,y)u(x,y)\right)+\frac{\partial^2}{\partial x^2}\left(C_3(x,y)u(x,y)\...
3
votes
1answer
67 views

Save neural network after training

I've written quite a few projects that involve training a neural network through the Classify and Predict functions, but every ...
1
vote
1answer
32 views

$q$-multinomial series

I have the following code, which produces a $q$-multinomial coefficient, but selected randomly according to a Poisson distribution. Consider a 3D lattice path selected uniformly at random from a ...
2
votes
1answer
43 views

Difference Between Set and Pattern in Mathematica

Ok, sorry if this is too basic, I'm somewhat new to Mathematica, but I keep making errors in my code because I'm not understanding the namespaces. So this part I thought I understood. ...
0
votes
1answer
49 views

NonlinearModelFit on functions with NIntegrate doesn't give the right parameters

I have read some of the threads in the forum and tried to fit my data using nonlinearmodelfit, but the fitting result doesn't match the data at all. I set the initial fitting parameter values ...
1
vote
1answer
46 views

Need to verify strange behavior with Product[]

I'm running 12.1.0.0 on MacOS X x86 (64-bit). The expression Product[1 - 1/n^5, {n, 2, Infinity}] yields 0 as output, which is ...
2
votes
0answers
34 views

What built-in functions have bad time/space complexity and their alternatives?

It's surprising that Join is $\mathcal{O}(n)$ (due to copy) while I've been using it as a convenient way to join lists together. It also reminds me of suggestions ...
2
votes
3answers
33 views

Appending a list into another list at various levels [duplicate]

I have a list with three levels. list = {{{7, 5, 8}, {4, 8, 9}, {7, 0, 1}, {3, 0, 4}, {5, 1, 2}}}; And I want to put in a list {e,x,y} at the end of every element. ...

15 30 50 per page
1
5 6
7
8 9
1411