# Numerics

**URL:** https://discourse.julialang.org/c/domain/numerics/20.md?page=33

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 34

---

## [Kernel Polynomial Method](https://discourse.julialang.org/t/kernel-polynomial-method/34240)

<div class="topic-metadata">

**Author:** [@mgaffar](https://discourse.julialang.org/u/mgaffar)\
**Replies:** 3\
**Last updated:** [February 7, 2020, 6:56pm UTC](https://discourse.julialang.org/t/kernel-polynomial-method/34240 "2020-02-07T18:56:57Z")

</div>

Is there any packages that already implement KPM?

---

## [On solving sets of linear equations in Fortran vs Julia](https://discourse.julialang.org/t/on-solving-sets-of-linear-equations-in-fortran-vs-julia/33729)

<div class="topic-metadata">

**Author:** [@razvangheorghe](https://discourse.julialang.org/u/razvangheorghe)\
**Replies:** 14\
**Last updated:** [February 7, 2020, 12:23pm UTC](https://discourse.julialang.org/t/on-solving-sets-of-linear-equations-in-fortran-vs-julia/33729 "2020-02-07T12:23:27Z")

</div>

Hi, I’d like to translate a Fortran 90 program to Julia and then continue with my development in Julia. The bottleneck right now seem to be the solving of around 100 systems of linear equations where the matrix (~400x400…

---

## [Gen install](https://discourse.julialang.org/t/gen-install/26459)

<div class="topic-metadata">

**Author:** [@kadir.nar](https://discourse.julialang.org/u/kadir.nar)\
**Replies:** 10\
**Last updated:** [February 7, 2020, 4:21am UTC](https://discourse.julialang.org/t/gen-install/26459 "2020-02-07T04:21:16Z")

</div>

“pkg\> add GitHub - probcomp/Gen.jl: A general-purpose probabilistic programming system with programmable inference” “ERROR: syntax: extra token “https” after end of expression.” Can you help me? Thanks.

---

## [Problem with variable scope when translating from Matlab to Julia](https://discourse.julialang.org/t/problem-with-variable-scope-when-translating-from-matlab-to-julia/34200)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 8\
**Last updated:** [February 6, 2020, 2:43am UTC](https://discourse.julialang.org/t/problem-with-variable-scope-when-translating-from-matlab-to-julia/34200 "2020-02-06T02:43:16Z")

</div>

Hi guys my problem is as follows: buff = g0 for i\_exh in 1:k f\_exh = obj\_rbfS3(x + y\_exh\[i\_exh\] \* v, X, ...) if f\_exh\[1,1\] \> buff\[1,1\] if i\_exh \> 1 gp\_exh = rbf\_dirS3(x + y\_exh\[i\_exh - 1\] \* v…

---

## [How to generate a random unitary matrix perfectly in Julia](https://discourse.julialang.org/t/how-to-generate-a-random-unitary-matrix-perfectly-in-julia/34102)

<div class="topic-metadata">

**Author:** [@JunjieWu](https://discourse.julialang.org/u/JunjieWu)\
**Replies:** 10\
**Last updated:** [February 3, 2020, 4:18pm UTC](https://discourse.julialang.org/t/how-to-generate-a-random-unitary-matrix-perfectly-in-julia/34102 "2020-02-03T16:18:00Z")

</div>

Dear friends, I am trying to implement a function that generates a random unitary matrix. However, I found that I met a precision issue. Is any idea how to solve this problem? using LinearAlgebra function RandomUnitar…

---

## [FFT + Measurements](https://discourse.julialang.org/t/fft-measurements/33791)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 1\
**Last updated:** [January 26, 2020, 12:31am UTC](https://discourse.julialang.org/t/fft-measurements/33791 "2020-01-26T00:31:39Z")

</div>

I thought it would be cool if I could calculate the FFT using uncertain data, so I tried using Measurements together with FFTW. I did not get it working. Instead, I wrote a simple FT function which can be used with Meas…

---

## [Automatic Differentiation of arbitrary-order derivatives](https://discourse.julialang.org/t/automatic-differentiation-of-arbitrary-order-derivatives/33774)

<div class="topic-metadata">

**Author:** [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Replies:** 3\
**Last updated:** [January 25, 2020, 9:36am UTC](https://discourse.julialang.org/t/automatic-differentiation-of-arbitrary-order-derivatives/33774 "2020-01-25T09:36:16Z")

</div>

I was wondering if it is possible to programmatically do higher-order automatic differentiation using ForwardDiff (or ReverseDiff). Here’s a MWE that shows a non-optimal way to get specific derivatives (hard-coded): im…

---

## [Solving sparse singular linear systems](https://discourse.julialang.org/t/solving-sparse-singular-linear-systems/33401)

<div class="topic-metadata">

**Author:** [@FHell](https://discourse.julialang.org/u/FHell)\
**Replies:** 3\
**Last updated:** [January 24, 2020, 1:23pm UTC](https://discourse.julialang.org/t/solving-sparse-singular-linear-systems/33401 "2020-01-24T13:23:19Z")

</div>

I have a problem with solving sparse singular linear systems (flow problems on possibly disconnected graphs). I need the minimum norm solution for this. Essentially the sparse version of this: P = \[0.5, -0.5\] M = \[1. -1…

---

## [Solving for eigenvalues of an equation system in ApproxFun.jl](https://discourse.julialang.org/t/solving-for-eigenvalues-of-an-equation-system-in-approxfun-jl/33682)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 3\
**Last updated:** [January 24, 2020, 11:02am UTC](https://discourse.julialang.org/t/solving-for-eigenvalues-of-an-equation-system-in-approxfun-jl/33682 "2020-01-24T11:02:23Z")

</div>

I’m trying to solve an eigenvalue problem for a system of equations using ApproxFun; however I’m getting an implementation error ERROR: Implement Conversion from Chebyshev{Interval{:closed,:closed,Int64},Float64} to Appr…

---

## [Computation of elliptic integrals with arbitrary precision](https://discourse.julialang.org/t/computation-of-elliptic-integrals-with-arbitrary-precision/33717)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 24, 2020, 12:38am UTC](https://discourse.julialang.org/t/computation-of-elliptic-integrals-with-arbitrary-precision/33717 "2020-01-24T00:38:39Z")

</div>

I have seen the issue Support for extended precision in Elliptic.jl. It references the pull request Jacobi elliptic functions and complete elliptic integral of the first kind in SpecialFunctions.jl which is year old and …

---

## [Interpolation-weighted quadrature rules](https://discourse.julialang.org/t/interpolation-weighted-quadrature-rules/32170)

<div class="topic-metadata">

**Author:** [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Replies:** 1\
**Last updated:** [January 22, 2020, 8:56pm UTC](https://discourse.julialang.org/t/interpolation-weighted-quadrature-rules/32170 "2020-01-22T20:56:07Z")

</div>

Some of you might be interested in the following notebook, which shows how to construct optimal Gaussian quadrature schemes for arbitrary weight functions constructed from interpolated data: Notes on Solar-Weighted Gau…

---

## [\`sol.du\` is \`nothing\` in \`DAESolution\`](https://discourse.julialang.org/t/sol-du-is-nothing-in-daesolution/33636)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 0\
**Last updated:** [January 21, 2020, 8:32pm UTC](https://discourse.julialang.org/t/sol-du-is-nothing-in-daesolution/33636 "2020-01-21T20:32:37Z")

</div>

I tried the DAEProblem example in the manual of the DifferentialEquations. The example is given is here. using DifferentialEquations using Sundials function f(out,du,u,p,t) out\[1\] = - 0.04u\[1\] + 1e4\*u\[2\]…

---

## [Is there in Julia something similar to min(X, Y) of Matlab where X and Y are matrices of same dimensions](https://discourse.julialang.org/t/is-there-in-julia-something-similar-to-min-x-y-of-matlab-where-x-and-y-are-matrices-of-same-dimensions/33475)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 4\
**Last updated:** [January 21, 2020, 6:25am UTC](https://discourse.julialang.org/t/is-there-in-julia-something-similar-to-min-x-y-of-matlab-where-x-and-y-are-matrices-of-same-dimensions/33475 "2020-01-21T06:25:17Z")

</div>

Hi guys, just wondering if there is a function in Julia similar to min(X, Y) (where X and Y are matrices of same dimension) of Matlab. The result is a matrix of the same dimensions as X and Y with elements t…

---

## [Julia Linear System Solver (\`mldivide()\`)](https://discourse.julialang.org/t/julia-linear-system-solver-mldivide/33447)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 6\
**Last updated:** [January 17, 2020, 12:37pm UTC](https://discourse.julialang.org/t/julia-linear-system-solver-mldivide/33447 "2020-01-17T12:37:19Z")

</div>

In the question Solution of Underdetermined Systems Using LAPACK @stevengj mentioned that the \\ operator in Julia returns the Minimum Norm Solution for Under determined System. The Matrix Division operator, \\ according…

---

## [Question on boundary conditions in DiffEqOperators.jl for 2D-case](https://discourse.julialang.org/t/question-on-boundary-conditions-in-diffeqoperators-jl-for-2d-case/33079)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 0\
**Last updated:** [January 7, 2020, 8:46pm UTC](https://discourse.julialang.org/t/question-on-boundary-conditions-in-diffeqoperators-jl-for-2d-case/33079 "2020-01-07T20:46:47Z")

</div>

I just started to play around with DiffEqOperators. I’d like to extend the example at https://github.com/JuliaDiffEq/DiffEqOperators.jl/blob/master/examples/poisson.jl to a 2D case. Here is the adapted code: using Dif…

---

## [Fortuna random number generator](https://discourse.julialang.org/t/fortuna-random-number-generator/33030)

<div class="topic-metadata">

**Author:** [@mleisher](https://discourse.julialang.org/u/mleisher)\
**Replies:** 2\
**Last updated:** [January 6, 2020, 5:28pm UTC](https://discourse.julialang.org/t/fortuna-random-number-generator/33030 "2020-01-06T17:28:15Z")

</div>

I whipped up a Fortuna RNG (generator only, no entropy accumulator and seed file yet) and being fairly new to Julia, am looking for performance improvement suggestions. New feature suggestions are welcome as well, but th…

---

## [Error Symbolic calculations could not initiate. Likely there's a function which is not differentiable by SymEngine](https://discourse.julialang.org/t/error-symbolic-calculations-could-not-initiate-likely-theres-a-function-which-is-not-differentiable-by-symengine/32707)

<div class="topic-metadata">

**Author:** [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Replies:** 1\
**Last updated:** [December 26, 2019, 12:28pm UTC](https://discourse.julialang.org/t/error-symbolic-calculations-could-not-initiate-likely-theres-a-function-which-is-not-differentiable-by-symengine/32707 "2019-12-26T12:28:37Z")

</div>

I’m simulating a satellite around the earth, and got error: Symbolic calculations could not initiate. Likely there's a function which is not differentiable by SymEngine. I think it’s because it cannot differentiate the…

---

## [Issue with integration close to 0](https://discourse.julialang.org/t/issue-with-integration-close-to-0/32138)

<div class="topic-metadata">

**Author:** [@Vardges\_Tserunyan](https://discourse.julialang.org/u/Vardges_Tserunyan)\
**Replies:** 1\
**Last updated:** [December 11, 2019, 8:47am UTC](https://discourse.julialang.org/t/issue-with-integration-close-to-0/32138 "2019-12-11T08:47:46Z")

</div>

I am trying to integrate a fairly simple set of linear differential equations. When getting closer to 0, one of the variables in question (x1) starts oscillating going from negative to positive and back. This must be wro…

---

## [@variables as function parameter](https://discourse.julialang.org/t/variables-as-function-parameter/31650)

<div class="topic-metadata">

**Author:** [@cvanaret](https://discourse.julialang.org/u/cvanaret)\
**Replies:** 1\
**Last updated:** [December 3, 2019, 5:11pm UTC](https://discourse.julialang.org/t/variables-as-function-parameter/31650 "2019-12-03T17:11:17Z")

</div>

Hi, I started playing with the IntervalConstraintProgramming module in Julia, and ran into a problem. Here is a minimal example: using IntervalConstraintProgramming using IntervalArithmetic using ModelingToolkit func…

---

## [Interval arithmetic - computation time](https://discourse.julialang.org/t/interval-arithmetic-computation-time/14633)

<div class="topic-metadata">

**Author:** [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)\
**Replies:** 16\
**Last updated:** [November 29, 2019, 10:02am UTC](https://discourse.julialang.org/t/interval-arithmetic-computation-time/14633 "2019-11-29T10:02:37Z")

</div>

Hi, I just started using the IntervalArithmetic package for Julia. For the same computations, Matlab (using IntLab) performs extremely well in comparison with Julia. The implementation has ben adapted, that is the compu…

---

## [Differentiating through a Jump Problem](https://discourse.julialang.org/t/differentiating-through-a-jump-problem/31496)

<div class="topic-metadata">

**Author:** [@DR59](https://discourse.julialang.org/u/DR59)\
**Replies:** 28\
**Last updated:** [November 28, 2019, 12:41am UTC](https://discourse.julialang.org/t/differentiating-through-a-jump-problem/31496 "2019-11-28T00:41:57Z")

</div>

Hi all, I’m thinking about Gillespie simulations, as one might use to simulate the individual molecules of a chemical reaction. Clearly a Gillespie Simulation (JumpProblem) is non-differentiable, as it has non-determin…

---

## [Strange Behaviour of Stiff Solvers in DifferentialEquations.jl](https://discourse.julialang.org/t/strange-behaviour-of-stiff-solvers-in-differentialequations-jl/31407)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 2\
**Last updated:** [November 23, 2019, 7:50am UTC](https://discourse.julialang.org/t/strange-behaviour-of-stiff-solvers-in-differentialequations-jl/31407 "2019-11-23T07:50:17Z")

</div>

I have run into a surprising problem when using stiff solvers in DifferentialEquations.jl. It appears to be related to the automatic differentiation. Basically, when using the stiff solvers, I appear to be unable to assi…

---

## [Benchmarking a simple PDE algorithm in Julia, Python, Matlab, C++, and Fortran](https://discourse.julialang.org/t/benchmarking-a-simple-pde-algorithm-in-julia-python-matlab-c-and-fortran/5002)

<div class="topic-metadata">

**Author:** [@John\_Gibson](https://discourse.julialang.org/u/John_Gibson)\
**Replies:** 41\
**Last updated:** [November 19, 2019, 10:12pm UTC](https://discourse.julialang.org/t/benchmarking-a-simple-pde-algorithm-in-julia-python-matlab-c-and-fortran/5002 "2019-11-19T22:12:23Z")

</div>

As a warm-up and preliminary test for writing a distributed-memory fluids code in Julia, I did some benchmarking of Julia on a simple numerical integration algorithm for the 1d Kuramoto-Sivashinky equation. https://gith…

---

## [Using ForwardDiff to compute the jacobian and gradient of a function that includes another function](https://discourse.julialang.org/t/using-forwarddiff-to-compute-the-jacobian-and-gradient-of-a-function-that-includes-another-function/31255)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 0\
**Last updated:** [November 19, 2019, 7:35am UTC](https://discourse.julialang.org/t/using-forwarddiff-to-compute-the-jacobian-and-gradient-of-a-function-that-includes-another-function/31255 "2019-11-19T07:35:29Z")

</div>

hi guys I have a situation like following: function update\_step(kernelPCA::KernelPCA, withRespectTo::Type{WithRespectToData}, abstractApplication::Type{Denoising}, …

---

## [Newbie in stochastic differential equations](https://discourse.julialang.org/t/newbie-in-stochastic-differential-equations/31080)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 1\
**Last updated:** [November 14, 2019, 1:12pm UTC](https://discourse.julialang.org/t/newbie-in-stochastic-differential-equations/31080 "2019-11-14T13:12:07Z")

</div>

Hello everyone, I am new to stochastic differential equations, and I don’t understand the formalism of g and dW. I need to solve the differential equation system with the noise which enters in multiple equations and the…

---

## [Problem of the calculation of matrix](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 1:17am UTC](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956 "2019-11-12T01:17:30Z")

</div>

Background : I use Julia to construct Symmetric normalized Laplacian matrix L^{sym} (Matrix D is a diagonal matrix):L^{sym}=D^{-1/2}×L×D^{-1/2}. Matrix L^{sym} is a sparse matrix. My computer configuration: julia\> ve…

---

## [What's the most idiomatic way in Julia to "invert" a unit range?](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929)

<div class="topic-metadata">

**Author:** [@jburgy](https://discourse.julialang.org/u/jburgy)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 5:59am UTC](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929 "2019-11-11T05:59:29Z")

</div>

I am parallelizing an implicit sparse matrix vector multiplication. This requires translating between block and matrix indices. The blocks are defined by UnitRange. getindex(v::UnitRange{T}, i::Integer) maps a block i…

---

## [For loop expression evaluation in DifferEq solver](https://discourse.julialang.org/t/for-loop-expression-evaluation-in-differeq-solver/30563)

<div class="topic-metadata">

**Author:** [@jbarazesh3](https://discourse.julialang.org/u/jbarazesh3)\
**Replies:** 12\
**Last updated:** [November 8, 2019, 12:54pm UTC](https://discourse.julialang.org/t/for-loop-expression-evaluation-in-differeq-solver/30563 "2019-11-08T12:54:16Z")

</div>

I am trying to evaluate strings within a for loop within an R script using JuliaCall::julia\_eval . While I was able to accomplish this in R using the deSolve package, I am running into issues when converting the code …

---

## [Efficient way to handle operator splitting (periodically updating solution mid-solve) in JuliaDiffEq](https://discourse.julialang.org/t/efficient-way-to-handle-operator-splitting-periodically-updating-solution-mid-solve-in-juliadiffeq/30757)

<div class="topic-metadata">

**Author:** [@jimmielin](https://discourse.julialang.org/u/jimmielin)\
**Replies:** 3\
**Last updated:** [November 6, 2019, 9:04pm UTC](https://discourse.julialang.org/t/efficient-way-to-handle-operator-splitting-periodically-updating-solution-mid-solve-in-juliadiffeq/30757 "2019-11-06T21:04:29Z")

</div>

I am writing a simple model of atmospheric chemistry in Julia using DifferentialEquations.jl to solve the chemical kinetics ODEs. While chemical kinetics can be modeled using a system of ODEs, some processes in modern a…

---

## [Finding the least norm solution of least squares problem with a sparse matrix](https://discourse.julialang.org/t/finding-the-least-norm-solution-of-least-squares-problem-with-a-sparse-matrix/30702)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 2\
**Last updated:** [November 4, 2019, 7:56pm UTC](https://discourse.julialang.org/t/finding-the-least-norm-solution-of-least-squares-problem-with-a-sparse-matrix/30702 "2019-11-04T19:56:10Z")

</div>

I have a matrix M which is the transpose of the Laplacian of a graph and a vector d that may or may not be in the range of M. I want to compute pinv(M)\*d. I assumed that qr(M)\\d does what I want, however it does it only…

[Previous page](https://discourse.julialang.org/c/domain/numerics/20.md?page=32)

[Next page](https://discourse.julialang.org/c/domain/numerics/20.md?page=34)
