Questions tagged [code]
The code tag has no summary.
77 questions
0
votes
0
answers
54
views
How can I colour the code? [duplicate]
I would like to colour the code like in this example:
Searching through the posts I have found that I should add code like this
...
1
vote
0
answers
110
views
Solution of the system of Equations using iterative Varga's Algorithm?
I am working on research article with link https://www.sciencedirect.com/science/article/abs/pii/S0378475421004560
It contains dimensionless non-linear equations mentioned in article.
I am writing the ...
1
vote
0
answers
76
views
Figuring out if I have a mistake or bug in computation of series expansion
I am trying to do some expasions of elliptic integrals. For that I need the following expansions first
...
0
votes
1
answer
192
views
Trying to invert a series in Mathematica
I have the function J in two variables $m$ and $l$, which I obtained doing a series for $e$ and replacing $m \rightarrow e\cdot m$ and $l\rightarrow e\cdot l$, given by
\begin{align}
J(l,m):=& -2 \...
0
votes
0
answers
88
views
How to design code for solution of the system of Equations?
I am studying a research article of fluid mechanics with title ``Influence of mixed convection nanofluid flow over a rotating sphere in
the presence of diffusion of liquid hydrogen and ammonia''
The ...
0
votes
0
answers
55
views
2 identical codes in the same notebook giving different results with Contour Plot [duplicate]
I had written the following code (1st code) in Mathematica 11. But when I write the same code in Mathematica 14.2 the 2nd code is giving me an empty plot! The problem is not due to Plot Points, or the ...
2
votes
2
answers
121
views
Simple example of running one notebook from another [closed]
I have two notebook codes 'calculation.nb' and 'caller.nb'. The first code simply generates and prints a random number. The second code I want to use to call the first code a set number of times (say ...
0
votes
0
answers
134
views
Syntax error "Has no closing"
In this code
...
0
votes
1
answer
155
views
Converting HurwitzZeta function to PolyGamma function
A generalization produces a result in terms of Zeta[s,a] function, which can be converted to PolyGamma[s-1,a] using the ...
7
votes
3
answers
660
views
Help with a very ugly piece of code [duplicate]
In orden to list all derangements of five elements, I wrote the following (very ugly) code:
...
1
vote
0
answers
90
views
Help with a partial differential equation - inaccurate result
I'm trying to solve the following partial differential equation using NDSolve
...
0
votes
0
answers
76
views
Solve system of integrated differential equations
I want to solve a system of integrated differential equations but I am encountering a problem with my Mathematica code.
\text{ka}=\text{kb}=1;
\text{wa}=\text{wb}=\frac{w}{2};
\text{Jxy}=0.5;
\text{Jz}...
0
votes
0
answers
122
views
Using CrossEntropyLoss function for basic neural network
Hi I am interested in understanding how to use the neural network functions in Mathematica. I have just started learning hence this is a basic query. The simple example I am looking at is as follows: ...
1
vote
0
answers
226
views
How to simplify the results of squared amplitude calculations in FeynCalc?
I want to calculate the squared amplitude of the Feynman diagram of double-pion photoproduction using FeynCalc package. Here is the code I created:
...
2
votes
3
answers
446
views
Saving formatted code [closed]
I am writing some ODE notes with lots of pictures generated using Mathematica, and I'd like to include the code used to generate them.
Currently I have a notebook where all the pictures are generated. ...