# All Questions

8,854 questions
Filter by
Sorted by
Tagged with
600 views

### The condition for stability using the leapfrog method

I have the ODE below $$\frac{d}{dt}\pmatrix{x\\ y} = \pmatrix{0 &1\\-a &0}\pmatrix{x\\ y} \enspace .$$ The $m=1$ leapfrog method is defined as: $$y_{n+1} = y_{n-1} + 2f_nh \enspace .$$ For ...
410 views

### Order of accuracy of DGFEM or FEM

I know that it is possible to determine the theoretical order of accuracy (B) of numerical solutions in FVM (for instance for a steady problem in which only the central differencing scheme (CDS) is ...
636 views

### How to plot a price level matrix in Matlab?

I have a matrix P of m rows and n columns. P(i,j) contains the price of occupying position i at time j. I want to plot this in Matlab but in a way to get some kind of density plot with different price ...
1k views

### Finite-difference approximation of the 2nd derivative operator matrix for a staggered grid

I'm working on a computational physics assignment and I was looking for some help as I've got stuck! The question is: Write a function to create the finite-difference approximation of the 2nd ...
5k views

86 views

### what is the upper bound of $\max \mathbf{w}^T\mathbf{x}_i$

I need to find an equation for the upper bound of $\max \mathbf{w}^T\mathbf{x}_i, \; i=1, \dots N$. where $\mathbf{w}$ and $\mathbf{x}_i$ are two vectors. I need to find a function $f$ which holds ...
77 views

### Feedforward net lagged prediction

I am trying to predict y(t+1) of a function by using a feedforward neural network with Matlab. The inputs are the previous 3 previous values (y(t-2), y(t-1), y(t)) and the training output is the ...
106 views

### How many sample points are needed when re-constructing linear combination of 2D polynomials defined over unit circle?

I have a set of first 25 Zernike polynomials. Below are shown few in Cartesin co-ordinate system. z2 = 2*x z3 = 2*y z4 = sqrt(3)*(2*x^2+2*y^2-1) : : ...
88 views

### Visualise data under Tecplot

I have a set of data that I need to visualise under Tecplot, the file format is for example: ...
759 views

### Converting smooth $L1$ norm approximation into SOCP

I am approximating the expression $\left\|Ax-b\right\|_1$ by the expression $$\text{minimize}\;\;\sum_i\sqrt{(a_i^Tx-b_i)^2+\varepsilon}$$ where $a_i$ is the $i^{th}$ row of $A$. This function is ...
263 views

2k views

### Gonzalez algorithm

I'm getting confused about implementing the Gonzalez algorithm for k-center clustering. The algorithm is : let $S$ be a data set Choose $z_1 \in S$ arbitrarily. Number $z$ is center. (In general ...
210 views

### Strict Feasibility in Interior Point Methods

As we know, in the interior point methods, all the iterates have to be strictly feasible. I implemented an affine scaling interior point for nonlinear objective functions. For small examples (2D), it ...
622 views

### Interpolating 3D Array non-monotonic data in MatLab

I am working on creating a program for simulations where three variables are parametrized, and we modify one parameter while keeping the other two constant. An example array looks like this when ...
1k views

### Temperature dependent 1-d conduction in Python?

I'm trying to write a Python code that is a numerical solver for 1-d heat conduction (using FVM) with a temperature dependent thermal conductivity. The solver has three functions I need to iterate ...
1k views

467 views

### Python: Computation time Issue with mpi4py

I am using in Python mpi4py to process in parallel 20 minimization functions. Each of the 20 worker processes the same algorithm but with different random initial ...