All Questions
94,738
questions
2
votes
0
answers
40
views
A question about using .dll in Mathematica with LibraryFunctionLoad
I am trying to use a custom trilinear interpolation written in C in Mathematica (Windows).
This is the code I start with:
...
6
votes
1
answer
53
views
ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array
I have an external c-function I need to call, and I wish to use ForeignFunctionLoad.
The c-function, foo, takes as an argument a reference to a struct, for example:
...
1
vote
1
answer
70
views
How to find the solutions to simulteneous linear equations in mathematica, in case if the solution to them is not unique?
I have these three simultaneous equations
b+c-a-d=0; 2b-a+c=0 and c-e=0
I entered the command
Solve[{b+c-a-d==0, 2b-a+c==0, c-e==0},{b,d}]
But I got {}
0
votes
0
answers
25
views
Inconsistency of copying and pasting curly quotation marks in the notebook
When my string( Input or Output Cell style) or text( Text Cell style) contains curly ...
1
vote
1
answer
97
views
How to optimize performance with DeleteDuplicates?
Does anyone know how to improve this for speed performance? The code works fine, but DeleteDuplicates makes it really slow for large lists.
...
0
votes
1
answer
43
views
Finding an increasing or decreasing function
I have a problem where I am given the derivative of a function, asked to graph it, then state where it is increasing or decreasing using Mathematica.
f'(x)=(x^2-3^x)/2x 0<x<4
I've tried the line ...
1
vote
1
answer
83
views
Can I improve my code to extract permutation cycles from a (n,2) matrix?
I've written a routine to extract permutation cycles from a (n,2) matrix, each row giving the format $a\to b$ which represents the first two elements in some $k$ cycle. If $a\to a$, it's a $1$-cycle. ...
0
votes
0
answers
37
views
New interpolating function on the mesh from operations on other ones
I am solving non-linear PDE using iterations. Correspondingly, the coefficients are functions on the (same) mesh that I have created and fixed. Between iterations I need to update these function by ...
2
votes
2
answers
136
views
Confused about the output of `CosIntegral`
I am interested in the properties of the cosine integral function, in this case the anti-derivative of Cos[Pi*x]/x, which Mathematica evaluates to ...
1
vote
0
answers
41
views
Solving a large number of coupled non-linear equations
I would like to numerically have a solution of the Gross-Pitaevskii equation for an impurity coupled with a 1D weakly interacting bosonic bath, given by:
\begin{align}
i\frac{\partial \phi_0(x,t)}{\...
1
vote
1
answer
44
views
Issue with a Piecewise Diffusion Problem [duplicate]
I'm working on a piecewise diffusion problem in Mathematica where the diffusion coefficient is 1 in the first region (x ≤ 1) and 2 in the second region (x > 1). The initial condition is also ...
1
vote
0
answers
20
views
Changes to Charting`ScaledTicks
The undocumented command Charting`ScaledTicks is used to easily define Ticks for a plot. However, it changed dramatically between Mathematica 12 and Mathematica 13.
In Mathematica 12 the command was
<...
0
votes
0
answers
39
views
Can we extract excel cell’s background colors
With the Excel import function we can get the formatted data of the values in the cell by using “FormattedData”.
I really would like to get the cell background color because it’s used as markers (like ...
3
votes
2
answers
96
views
How to typeset a key combination in Mathematica notebook?
I'm writing a tech note in Mathematica, and would like to include some key combination shortcuts. For example, Ctrl+/ for entering fractions. How do I typeset key combinations so that they look like ...
0
votes
0
answers
27
views
Find the function for a decision variable
I'm currently trying to find the equation for a decision variable from a total profit equation using Mathematica. From what I've read, I can use the solve function to do this. Here's a example i found:...