Top new questions this week:
|
Consider the following equation on $(0,1)$, with Dirichlet boundary conditions on both ends. $$ \frac{d}{dx}\left(k(x)\frac{du}{dx}\right) = 0 $$ Let us solve this using simple linear finite elements. …
|
I’m a PhD working in the mechanical engineering community. I constantly use open source FEM libraries to solve my problems. Up to now I didn’t really care about the performance of my codes, mainly …
|
Given a set of filter taps $\{h_n\}_{n=0}^{m-1}$, define a scaling function $\phi$ by $$\phi(x) = \sqrt{2}\sum_{n} h_n \phi(2x-n).$$ In keeping with the notation from Daubechies “Ten Lectures on …
|
I am interested in generating collective Pauli Z spin operators for a quantum protocol in Python. To this end I need to generate large $2^N \times 2^N$ collective Pauli operators of the form \begin{…
|
I have solved the Time Independent Schrodinger Equation using the Numerov method and diagonalizing the Hamiltonian, in 1 – 3 dimensions. I suppose I could time-evolve it by multiplying every element …
|
I am trying to solve the following complex-valued matrix differential equation backwards (i.e. not starting at $r=0$, but rather at $r > 0$): $F” = 2ikF’ + VF$. Here $F=F(r)$ and $V=V(r)$ are 2×2 …
|
Greatest hits from previous weeks:
|
I am trying to fit supernova data into a scipy.curve_fit function. However, when my code runs, the values of the unknown variables given by …
|
EDIT: I am testing if any eigenvalues have a magnitude of one or greater. I need to find the largest absolute eigenvalue of a large sparse, non-symmetric matrix. I have been using R’s …
|
I want to plot a numerical integral function of some function $f$ using scipy and matplotlib. How can I do this? I tried the …
|
I am working on a project that I need to add a regularization into the NNLS algorithm. Is there a way to add the Tikhonov regularization into the NNLS implementation of scipy [1]? [2] talks about it, …
|
I am solving differential equations that require to invert dense square matrices. This matrix inversion consumes the most of my computation time, so I was wondering if I am using the fastest algorithm …
|
I have a data set $x_{1}, x_{2}, \ldots, x_{k}$ and want to find the parameter $m$ such that it minimizes the sum $$\sum_{i=1}^{k}\big|m-x_i\big|.$$ that is $$\min_{m}\sum_{i=1}^{k}\big|m-x_i\big|.$$…
|
I would like to know if there is a quick way to compute the Euclidean distance of two vectors in Octave. It seems that there is no special function for that, so should I just use the formula with <...
|