All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
39 views

How to solve this DE to get a matrix?

I have this DE $ g^{m \bar{n}} g^{r\bar{p}} \partial_t {g}_{m r} \partial_t {g}_{\bar{n}\bar{p}} = X_{i\bar{j}}~ \partial_t{f}^i (t) ~ \partial_t{f}^\bar{j} (t) ~~~ ~~~~~~~~~~~~(*) $ Where ...
1
vote
1answer
66 views

How can I solve this equation for the exponent n?

How can I solve: $$(a^{n-5/2}-b^{n-5/2})=c$$ for $n$? $a$, $b$ and $c$ are known constant. It seems that Solve cannot solve it and ...
11
votes
3answers
589 views

WordCloud: do not eliminate duplicates

By default, WordCloud removes duplicates (or rather counts the number of times they occur, and uses that as the weight). Is there a way to turn this feature off, ...
6
votes
4answers
135 views

How to count the overlapped disks in a picture?

I have several picture containing many small circles. I can manually count the circles in these pictures but it will be time-consuming and make me tired. How can I use mathematica to do this job? I ...
1
vote
1answer
43 views

How to condition arguments of a pure function?

I would like to exclude the point {x=0,y=0} in the function definition ...
3
votes
0answers
58 views

Derivative of eigenvalues

I work with 4x4 Hermitian matrices (r). I want to calculate a derivative of a function f[t,r] (ff[t_,r_]=1/2*D[f[t,r],t]), where the function f depends on the absolute value of the eigenvalues of r. ...
2
votes
3answers
103 views

Map function over two lists

How to map a function over two lists, first one and than the other? For example, assuming I have two lists {a,b,c} and {d,e,f}: ...
0
votes
0answers
31 views

How to define a function in an implicit form

Know the 2-variables function $F(x,y)$. How can I define the function $x\to f(x)$ s.t. $F(x,f(x))=0$?
4
votes
3answers
95 views

Sparse matrix processing: flip sign of top-left entries of the matrix

I have a 12k X 12k sparse array (~1% density) and I need to: take the square root of all the elements flip the sign of all the elements in the top-left half of the matrix For example, say that the ...
0
votes
1answer
36 views

Speed up summation

I want to evaluate the following sum at lots of different values of $R_0$ and $N$ (roughly 100 of each, R0 ranging from 1 to 6, N ranging from 1000 to 10000): $ \langle Y \rangle = \frac{\sum_{Y=1}^N ...
0
votes
0answers
30 views

Wrong output with OPEdefs

I learn how to use the package OPEdefs.m to compute the OPEs in Mathematica. I practiced some commands along the manual (DOI: 10.1142/S0129183191001001). In section 3, explicit examples for a Kac-...
3
votes
2answers
123 views

Automatically bound histogram regions?

Given a histogram of some data, such as e.g. in the following sample https://www.codepile.net/pile/NLlNgP60 ...
3
votes
1answer
82 views

Edit value in nested Association

Here is a simplified version of my problem. I have a nested Association. ...
3
votes
1answer
51 views

Implementing Simpson's rule with two variables

For one of my lab project I need to integrate a given function (in this example, f1, using Simpson's ruls. When only one variable ...
5
votes
2answers
472 views

Game schedule where each player meets only once

I am trying to generate a game schedule where $k$ players at the time, out of $n$ participants, meet in each game, but any player meets another player only once. In each game, with $k$ simultaneous ...
1
vote
1answer
38 views

Implementing global Assumptions [closed]

Why do the following commands $Assumptions = {Element[x, Reals], x > 0}; Solve[{x^2 == 1}, {x}] Solve[{x^2 == -1}, {x}] give ...
0
votes
0answers
37 views

Improve speed of NIntegrate for functions which are sums of complex exponentials

I need to improve the efficiency for numerically evaluating a matrix element, which uses NIntegrate of the several functions (which are all sums of complex exponentials). Creating the functions from ...
3
votes
2answers
109 views

Group symbols by a given partition of the occuring symbols

I have following expression $$-3 b_{\sigma _d}-3 b_{\sigma _v}-b-b_2+2 j-2 j_2-2 j_3+2 j_6+12$$ Mathematica input ...
6
votes
0answers
63 views

Repeated string pattern: difference between the FrontEnd and WolframScript?

This code works fine in a string based interface like WolframScript or Mathematica Kernel. Run this through a string based interface ...
0
votes
0answers
43 views

Discrete inverse Laplace transform

I'm trying to find a method for obtaining the inverse Laplace transform of a series of discrete data points. I have tried deriving an analytical function from the data and then using that function ...
1
vote
1answer
34 views

Coefficient Array from total derivative of expression

I have an expression $$\dot{r}\dot{\eta}+r^{2}\dot{\theta}\dot{\xi}=0$$ where $\eta$ and $\xi$ are both functions of $r,\theta$. In MM I wrote this as ...
2
votes
1answer
78 views

Can we compile this function/distribution?

I would like to compile this function to make it faster: ...
3
votes
1answer
77 views

Recursive solution to the extended Josephus problem

The Josephus Problem is described here, with extension of killing every $k$th problem. In the simple case where every other person is killed, we can also use the binary trick. ...
2
votes
0answers
46 views

What do indices in brackets mean? [closed]

Solving the Schrodinger equation for a free particle gives me this output: What does the $\psi^{(2,0)}$ mean here?
1
vote
1answer
27 views

Creating a tensor of rank $k$ from elements of a list

Given a list containing $4^k$ elements, how do I create a "square" $\underbrace{4\times...\times4}_{k\text{-times}}$ tensor of rank $k$? Intuitively, I would opt for the ...
7
votes
3answers
379 views

Count number of occurences of particular numbers in list

I have a list of numbers which I have rounded and now all numbers are divisible by 5. ...
0
votes
1answer
36 views

Contour plot of data

I have two vectors (plain lists), say a,b, from which I generated a 2d table, say mat. It's not a direct expression like ...
0
votes
1answer
51 views

ErrorListPlot (in ver. 12) and double-Y plots [duplicate]

Both of my questions concern ListPlot, so I hope it is acceptable to ask them both in one post. ErrorListPlot seems to have ...
0
votes
0answers
24 views

Creating all possible $n$-touples of indices in order to output a tensor of arbitrary rank $n$? [closed]

I have a function T[i_, list_List], that accepts a matrix of dimension $2^n \times 2^n$ and $n$ indices $\in \{0,1,2,3\}$ and outputs the corresponding tensor ...
0
votes
1answer
29 views

Extending a piecewise function defined over a limited domain to be periodic over a larger domain

I need to plot the piecewise function $ \qquad f(x) = x^2\quad -2 <= x <= 0, \\ \qquad f(x) = 0\qquad 0 <= x <= 1 \\ \qquad f(x) = 1-x\quad 1 <= x <= 3 \\ $ as a periodic ...
3
votes
1answer
226 views

Speed up a distortion of 4k image

I want to undistort 4032 x 3024 image with OpenCV model using only radial distortion. This model is described here. The main issue is the speed. I have a function ...
0
votes
0answers
33 views

Plotting matrices

I have this expression: $\int g^{m \bar{n}} g^{r\bar{p}} \partial_t {g}_{m r} \partial_t {g}_{\bar{n}\bar{p}} ~ d^6 y = f(t)$ Where m,n,p,r=1,2,3 and the $\bar{}$ ...
0
votes
0answers
24 views

Unknown option ContentSize for Labeled? [closed]

I am (desperately) trying to get my labels smaller, but the ContentSize option does absolutely nothing to my 'Labeled' function, and I get the error message "Unknown option ContentSize for Labeled" ...
0
votes
0answers
34 views

How to find the value in which an expression becomes greater than another

I have the following expressions: $\Delta \sigma_1=\frac{2 \gamma ^2 \left(\text{$\sigma $Y} \log \left(\frac{\gamma }{\alpha }\right)+\text{pe}\right)}{\left(\gamma ^2-1\right) \rho ^2}$ $\Delta \...
0
votes
1answer
42 views

An extraneous line appears in the printed version of a Mathematica-image in a pdf-document

My system/workflow Mathematica version 11 MikTeX 2.9: tex->dvi->ps->pdf->paper I have run into the following difficulty. I cannot tell whether the problem is caused by Mathematica, MikTeX, Adobe, or ...
2
votes
2answers
129 views

NIntegrate doesn't work with NumericQ

Usually it is advised to use NumericQ to avoid symbolic evaluation in NIntegrate. Here I'm trying to use NumericQ, but the NIntegrate gives an error: ...
0
votes
1answer
17 views

Alignment when not dealing with (just) text [duplicate]

In designing interfaces for dynamic operation, I am finding that I cannot figure out how to get alignment to work. For example: ...
1
vote
0answers
34 views

Mathematica (v12.0) fails to Import NASACDF (Common Data Format)

I was doing research about Mars using data from MAVEN spacecraft. The data used could be downloaded from https://lasp.colorado.edu/maven/sdc/public/data/sci/swe/l2/2017/06/. When run ...
1
vote
1answer
92 views

How to get the implicit solution of this PDE (Maple can but I don't manage with mathematica)?

I asked this question about the analytical solution of the PDE: $$\partial_t c=\partial_x((c-a)(c-b)\partial_xc) $$ And I was given the answer that Maple gives the following implicit form as a ...
2
votes
1answer
73 views

How to use function as a placeholder for codes

I want to use function as a placeholder for a bunch of codes while making the function also produce an output Consider A={0,0,0}; f[x_]:=Block[{},A[[x]]=1;A] f[1] ...
1
vote
1answer
32 views

Chaining NetGraphs

I have two NetGraphs, each with 3 different input ports ("Input","Random1","Random2"), the first with 2 outputs ("Output" and "Loss") and the second with one output "Final_Out". All I want to do is "...
0
votes
0answers
44 views

What row do I change to make my determinant non zero?

I wish to make a matrix that has an inverse. I need rows that look like oscillating functions so I decided to base my matrix on ChebyshevT. This code makes an n by ...
5
votes
1answer
97 views

ParametricNDSolve fails when I *don't* print the results

Some updates added to end. Truly minimal exampled added at top. Minimal example: ...
2
votes
0answers
50 views

How to display rotated columns names in dataset?

Consider the following minimalist Dataset: ...
0
votes
0answers
12 views

Weird interaction between RegionFunction and MaxRecursion

Compare the two following outputs: ...
1
vote
2answers
81 views

Solving of Equation which contains Hypergeometric Function 2F1

I am trying to solve this equation where I need the solution of K in term of v ...
6
votes
1answer
50 views

Remove ticks from chart labels

Given the following chart: BarChart[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {{"r1", "r2"}, None}] How can I remove the ticks of the chart labels (marked with ...
5
votes
3answers
275 views

Changing Row Keys into Normal Rows

I have a dataset with column and row keys: ...
2
votes
2answers
44 views

How to obtain a variable in terms of another variable?

I'm new to Mathematica and would like to ask a question about equation systems. I have a linear equation system given in the link. I would like to obtain kappa1 in terms of psi1, kappa2 in terms of ...
0
votes
0answers
28 views

MorphologicalTransform: What is the difference between EndPoints and SkeletonEndPoints?

What is the difference between the "EndPoints" and "SkeletonEndPoints" functions of ...

15 30 50 per page