instruction
stringlengths
43
28.1k
I read some references including this. I am kind of confused what optimization problem compressed sensing builds and tries to solve. Is it $$\begin{array}{ll} \text{minimize} & \|x\|_1\\ \text{subject to} & Ax=b\end{array}$$ or/and $$\begin{array}{ll} \text{minimize} & \|x\|_0\\ \text{subject to} & Ax=b\end{array}$$ or...
Following regularized minimization problem $$\min f(x) + \lambda g(x)$$ where $\lambda>0$, and following constrained minimization problem $$ \min f(x) $$ s.t. $$ g(x) \leq \epsilon $$ where $\epsilon>0$, can be converted to each other so that they have the same solution. Examples are a $l^1$-regularized linear least ...
Given an unknown function $f:\mathbb R^d \to \mathbb R$, we can evaluate its value at any point in its domain, but we don't have its expression. In other words, $f$ is like a black box to us. What is the name for the problem of finding the minimizer of $f$? What are some methods out there? What is the name for the prob...
I'm currently learning about using linear and semidefinite programming to find sparse solutions to problems. In particular, finding sparse solutions where the sampling functions are sinusoidal (Dirichlet kernel). I've implemented a linear programming solution with a discrete approximation using l1magic MATLAB library, ...
I was wondering what differences are between the terminology: "least square (LS)" "mean square (MS)" and "least mean square (LMS)"? I get confused when reading in Spall's Introduction to Stochastic Search and Optimization, section 3.1.2 Mean-Squared and Least-Squares Estimation and section 3.2.1 Introduction and sectio...
I apologize if this is a naive question. I'm trying to create some boostrap data for a system of linear, ordinary differential equations at steady state. Since the equations represent the concentration of chemical species, X has to be positive. Further, I'm trying to find the sparsest possible matrix of A, for the sa...
Here is some code that hopefully clearly illustrates what I'm doing: >>> sp.linalg.eig(d)[0].real; sp.linalg.eigh(d)[0]; d; sp.linalg.eig(d)[1]; sp.linalg.eigh(d)[1] array([ 1., -1.]) array([-1., 1.]) matrix([[ 0, -1], [-1, 0]]) array([[ 0.70710678, 0.70710678], [-0.70710678, 0.70710678]]) array([[-0...
C++11 introduces move semantics which can, for example, improve code performance in situations where C++03 would need to perform a copy construction or copy assignment. This article reports that following code experiences a 5x speed up when compiled with C+11: vector<vector<int> > V; for(int k = 0; k < 100000; ++k) { ...
For a little project I'm working on, I am trying to generate a wavefunction basis set I can use in Quantum Monte Carlo (DMC to be specific). Preferably, it would be a linear combination of Slater determinants with a Jastrow term. However, my problem is that I don't want a pseudo-potential or any sort of electron distr...
I would like to find the analytical form of the point which minimizes the following function: $$ f(x_T) = \frac{1}{T} a_1 (x_T-x_0)^2 + a_2 |x_T-x_0| + T a_3 + \sum_{i=1}^M p_i \left[b_{1i} (x_T - l_i)^2 + b_{2i} |x_t - l_i| + b_{3i} \right] $$ where $T,a_1,x_0,a_2,a_3,p_i,b_{1i},l_i,b_{2i},b_{3i}$ are constants, $T,a_...
How do I approximate the condition number of a large matrix $G$, if $G$ is a combination of Fourier transforms $F$ (non-uniform or uniform), finite differences $R$, and diagonal matrices $S$? The matrices are very large and not stored in memory and are only available as functions. In particular, I have the following ma...
We're all familiar with the many computational methods to solve the standard linear system $$ Ax=b. $$However, I'm curious if there are any "standard" computational methods for solving a more general (finite dimensional) linear system of the form $$ LA=B, $$ where, say, $A$ is an $m_1\times n_1$ matrix, $B$ is an $m_...
Sometimes while optimizing code it is required to time certain portions of the code, I have been using the following for years but was wondering if there is a simpler/better way to do it? call system_clock(count_rate=clock_rate) !Find the time rate call system_clock(count=clock_start) !Start Timer call do_somethin...
I've been reading about the algebraic multigrid algorithm and came across polynomial smoothers in this paper. It's my understanding that usually the coarse-level matrices $A_H = I_h^HA_hI_H^h$ are formed explicitly. However, there's still the issue of how to define the coarse space corresponding to a given smoother. Th...
I'm doing some machine learning where I have lots of data and through optimization I'm trying to learn the weights for the model. I'd like to check that my learning actually works correctly. For that I can create a set of known weights. My question is from these weights, how can I create synthetic data? On this data I ...
I am running my Fortran 95 numerical codes, whose structure is most times easily parallelized by little more than simply adding the corresponding OpenMP instruction before some critical DO sentences, in a dual-core multi-thread CPU Intel CORE i3. Ubuntu "sees" four CPUs (obviously since there are 2 cores, each of them ...
Simulation type: I'm running a simulation with the OOMMF micromagnetics package http://math.nist.gov/oommf/ where are magnet is represented by a mesh of 3 million cells, it gets excited by a magnetic pulse, the single cells oscillate and data output for every cell is x, y, z direction and absolute magnetic field value...
Consider a continuous Markov chain $X=(X_t)$ on a finite state space and let $Q$ be the (given) transition rate matrix. This matrix is very sparse, with non-zero values on 3 diagonals only (so from each state, there can be transitions to 2 other states only). Let $P_t$ be the transition probability matrix, so $P_t(j,k)...
I've coupled a COMSOL model for fluid dynamics with a very simple pde that model the transport of humidity in air. When I solve it for the stationary case, the solution converge easily, but when I try to solve the time dependent problem, the solution can't reach convergence. This seems very strange to me, the fluid i...
I was reading thispaper related to kernel SVM. It states Support Vector Machine (SVM) (Cortes and Vap- nik, 1995) as the state-of-the-art classification algo- rithm has been widely applied in various scientific do- mains. The use of kernels allows the input samples to be mapped to a Reproducing Kernel Hilbert S- pace ...
I'm trying to make highly efficient CFD programming complex for solving combustion problems. I've finished writing core which realises mathematical model, and now I'm concerned about code performance. Combustion problems are very computationally expensive, with no doubt I'll have to make parallelization of my code, but...
I'm developing some larger code to perform eigenvalue computations of huge sparse matrices, in the context of computational physics. I test my routines against the simple harmonic oscillator in one dimension, since the eigenvalues are well known analytically. Doing so and comparing my own routines to SciPy's inbuilt so...
By "the simplest" I mean the simplest to learn and implement from scratch. I hope my question can more or less be answered.
I have run the molecular dynamics (MD) code GROMACS on a Ubuntu Linux cluster consisting of nodes containing 24 Intel Xeon CPUs. My particular point of interest turns out to be somewhat sensitive to floating point arithmetic precision, so I have had to run GROMACS in double precision rather than single precision -- de...
I found this method in this book for solving the Poisson equation with error converging with $\mathcal{O}(h^4)$. However, when I try to implement it for the 1D equation $-u''(x)=f(x)$, it only converges with around $\mathcal{O}(h^2)$. The math is as follows: Using Taylor Series, we get $$\frac{1}{h^2}[-u_{i-1} + 2u_i -...
I came across the following task recently: Use the von-Neumann stability analysis to investigate the stability of the discrete form of $\frac{\partial c}{\partial x} = \frac{\partial^2 c}{\partial y^2}$. Use the first-order forward finite difference for the first-order derivative and the usual central difference schem...
This question is a follow-up to Fortran: Best way to time sections of your code?. If I want to time functions in my code, I know I could use gprof or kcachegrind. I also know that the results from these tools can be skewed (see http://www.yosefk.com/blog/how-profilers-lie-the-cases-of-gprof-and-kcachegrind.html and htt...
I have a $53534\times 3$ matrix with $x$, $y$, and $z$ coordinates. I want to find the element of matrix within ranges as follows: % coordinate range; x1(x<-25|x>0); x2(x<0|x>25); y1(y<-40|y>0); y2(y<0|y>40); z1(z<45|z>0); z2(z<0|z>82); and insert them into a new matrix, so that it becomes point1=[x1, y1, z1]; point2=...
I am considering two equations $$u_t=a(x)u_{xx}$$ and $$v_t=b(x)v_x$$ as classical representatives of the parabolic and hyperbolic family of equations. If $a(x)=a$ and $b(x)=b$ were constants, to show stability of any finite difference scheme I use for those equations, I could use the Fourier or so called Von Neumann s...
This is a follow up to the question about the method of frozen coefficients. I think it deserves to be a separate question. The frozen coefficient problems are obtained by fixing the coefficients of the variable coefficient problem. For example, consider pde $$u_t=a(x)u_{xx}, x \in \mathbb{R}, u(0,x)=u_0(x)$$, then at ...
I am using the Dakota Optimizer. I have 50+ variables, 50+ constraints and more than one objective function. Independent of the actual optimizer used, or the output selected: Is there a way to plot the objective functions while the optimizer is running? Dakota offers a graphical output, but this shows a combined obje...
I was assigned a project in my intro to computer programming class. The goal is to implement a numerical model to some engineering or physics/science problem. The course uses Java. An example might be a soccer ball's flight. I'm looking for something a little bit more interesting than just modeling gravity, air drag,.....
I have a Kalman Filter based modelling code that I have developed for a near-real time regional ionospheric mapping application. The code assimilates data from different sensors into a map (described by a set of basis functions) using a Kalman Filter. I am trying to scale this up to a larger region and more sensors, ho...
I'm not really sure how to explain this problem clearly, so please bear with me. I have a basis of 3 orthonormal unit vectors and a position, a standard 4x4 transform matrix in computer graphics. Also I have several points (offsets) in that space that I transform to world space. The points are then perturbed slightly ...
As all knows incompressible flow doesn't exist in reality, its an assumption introduced to simplify governing equations. We can not apply this assumption straightforward. Generally Mach number(M<0.3 for incompressible flow), density variation(zero density variation) and divergence of velocity (is equal to zero for inco...
I know this question is somewhat familiar to my previous question found here, however I am now coming at it from a slightly different and more general angle. Let's say I have a code whose runtime is in the days to weeks range. For one reason or another, the code can not be changed to improve performance. My goal is t...
I'm implementing a Markov Chain Monte Carlo process for a Quantum Monte Carlo routine, in every book and paper I've read so far the success of the routine and quality of the results strongly depends on the random number generator. Well I've chosen to implement the code in C++ 2011, and I'm presented with a fair wide se...
I have a cubic of the form $$x^3 - a x - b = 0$$ where $a, b > 0$. Thus, I know there is exactly one positive root. Is there a nice stable formula for this unique positive root?
Let $T$ be a real symmetric tridiagonal matrix. Then the divide-and-conquer eigenvalue algorithm, as detailed in any standard text, goes by subdividing $$ T = \begin{bmatrix} T_1 & 0 \\ 0 & T_2 \end{bmatrix} + \rho vv^T,$$ after which we can solve the eigenvalue problem for $T_1, T_2$, and then solve the full eigenvalu...
There is quasi 1-D C-D nozzle test case for compressible flow codes, like that "is there any 1-D test case for incompressible flow codes?"
I'm calculating the gradient of a function with a symbolic math library called theano. Then I'm using gradient descent to find the minimum of the function. I'd like to prove that the minimum is a global minimum. How can I prove that my function is convex?
My dear community, I am wondering why BFGS methods are not so widely used for simulating mechanical problems which heavily still relies on inverting the hessian matrix. I am essentially interested by constrained problems (contact on the interface for instance), and I know that some authors proposed method to deal with...
Is there a way in Tecplot to change data from face-centred to node-based? If I look at the plot, it seems to me that internally Tecplot is changing the data from being at the centre of the face to being at the corner nodes - is this a correct observation and can this data be written to a file?
I tried to use PETSC direct solver (SUPER LU) to solve the system of equations. After a long time effort, the code is working properly and gives some good results. The only issue that came up recently is a bout memory leakage. I found that after iterations RES memory is increasing which leads to the server crash. I tri...
I have a completely beginner question about the setup of artificial neural networks. Basically it boils down to: How do I put in data and get results? For example, classification: let say I have 10 input features, all numerical, and 5 output classes. How do I set up my input layer and my output layer? Would it be...
Consider minimization of a biconvex function over a biconvex set. Is the biconvex optimization problems polynomially solvable?
With the Sun Grid Engine, how can I get the directory where the job script is located, within the job script? I need this so I can start the script with cd script-location to make sure it'll have access to all the necessary files. So far I have hard-coded the script directory into each script, which makes it much too...
First of all, I want to say that I am extremely new to MD simulations, so I apologize for any of these questions if they appear to be something that should be well known. I know that the classical type of picture that MD packages such as Gromacs give us are not really useful for simulating chemical reactions and non lo...
I plan to write a code that solves the flow past a cylinder and try to see the Von-Karman vortex street. I will solve the 2-D viscous, incompressible Navier-Stokes using the projection method. The following figure demonstrates a subset of my intended boundary. I am sort of confused about the decoupling of velocity and ...
In FEM applications, each processor needs only data from neighboring processors, which gives a stencil or star pattern of communication. In MPI_Win for MPI_Get, one needs to setup a group of processors to window on common data. But what we usually need is specifying a stencil pattern for MPI_Get. And it seems to me MP...
In the method of manufactured solutions (MMS) one postulates an exact solution, substitutes it in the equations and calculates the corresponding source term. The solution is then used for code verification. For incompressible Navier-Stokes equations, MMS easily leads to a (non-zero) source term in the continuity equati...
I was reading through this article (very good article and excellent blog BTW) to do some measurements in my (very simple) implementation of the Mandelbrot Set. I'm using a Quadro 2000D card which has a theoretical bandwidth of approximately 20 GB/s ( = 1304 MHz * 128 bit-bus). Mandelbrot image has 700x700 pixels (uchar...
I have an FFT code that solves a particular case of the steady Euler equations where a Poisson equation is solved, what is a good way to quantify the error? Is what I am doing ok? Since I do not have an analytic solution to compare with what I have done is I have computed the solution on a very fine grid and then comp...
When I use the cvx matlab toolbox, I met a puzzled problem. The function of fft (or dct, wavelet, etc.) cannot be recognized by the type of 'cvx'. For the 1-d fft, it can be constructed to an equivalent matrix. But for the 2-d fft, how to transform it to the matrix form ?
I want to explore the low energy states of an amino acid or a peptide by generating input geometries, defined by multiple dihedral angles of the backbone or the side chain. From these starting conformations I want to do geometry optimization to yield local energy minimum geometries. The following approaches failed: Us...
I have a Galerkin solution for a heat equation $$ u_t = \Delta u + f $$ with Dirichlet conditions $$ u=0, \qquad x \in \partial\Omega $$ The time discretization is done using a BDF scheme. How can I accurately and efficiently compute the heat flux on the boundary $$ \sigma = \frac{\partial u}{\partial n}, \qquad x \in ...
In "LU, QR and Cholesky Factorizations using Vector Capabilities of GPUs", by Vasily Volkov and James Demmel, there is an interesting way to interpret the latencies, line sizes, and page sizes of a cache from a graph like this: Apparently, the line size is where the the cache begins to plateau (about 32 bytes in this ...
There is unstructured grid which contains only quadrangles cells. Each cell has 4 neighbors, and known them (has a pointer to them). I can iterate through all cells in the grid. Some cells are marked as a "A - red" some as a "B - blue" - see attached picture - Image Cells form blue and red regions. I need to separate t...
I would like to use f2py with modern Fortran. In particular I'm trying to get the following basic example to work. This is the smallest useful example I could generate. ! alloc_test.f90 subroutine f(x, z) implicit none ! Argument Declarations ! real*8, intent(in) :: x(:) real*8, intent(out) :: z(:) ! Variabl...
SEE: http://www.songho.ca/dsp/convolution/convolution2d_example.html "First, flip the kernel, which is the shaded box, in both horizontal and vertical direction" Why do we need to flip the kernel in 2D convolution in the first place? So, why can't we leave it unflipped?
I know some of the places where SPD linar systems arises such as elliptic PDEs and normal equations. Can I have a more comprehensive list of scientific applications which require solving SPD linear system. I am specially interested in cases where matrix is not sparse and cases where matrix might not be available direct...
I'm working through a problem in a textbook as follows: "Consider the $d \times d$ Toeplitz matrix $$ A = \left[ \begin{array}{ccccc} 2 & 1 & 0 & \cdots & 0 \\ -1 &2 &1&\ddots&\vdots\\ 0&\ddots&\ddots&\ddots&0 \\ \vdots &\ddots&-1&2&1\\ 0&\cdots&0&-1&2 \end{array} \right].$$ Find explicitly all the eigenvalues of the ...
Given 3D Poisson equation $$ \nabla^2 \phi(x, y, z) = f(x, y, z) $$ and the right hand side and the domain, am I free to impose any boundary conditions (BC) on the function $\phi$, or do they have to be somehow consistent with the right hand side? In particular, if I impose periodic BC, will there be exactly one soluti...
I have a few set of data of three dimensional matrices, n x 3 with x, y and z coordinates. I viewed the matrices in the figure window. % read function; OBJ1=read_obj('subject1.obj'); FV.vertices=OBJ1.vertices; FV.faces=OBJ1.objects(2).data.vertices; figure, patch(FV,'facecolor',[0 0 1]); camlight grid on axis equal I ...
I am currently tasked with calculating the total flux of photons or irradiance from a flat emitter ('pixel'). Previously we measured the Luminance head-on (90 degree from the emitting surface) and calculated the illuminance assuming a lambertian emission. As it turns out the calculation fails for several of our devices...
I have coded a routine for interpolation with B-splines, only to discover later that this functionality is already included in Python's SciPy. However, I do not understand one parameter in the SciPy module (UnivariateSpline)[http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.UnivariateSpline.html#sci...
I am trying to do the speed up analysis of the rotating mask filter (section 4.2.3). Let $N^2$ be the pixels in the image and let $m^2$ be the neighborhood of a given pixel, what I have for my sequential code is basically the following steps for every pixel in the image for every rotating mask compute dispersi...
we are using a first order implicit finite volume code for simulation of incompressible flows. At its core, the code utilizes a (non-preconditioned) GMRES method for solving linear systems given in webpage In general, it is quite difficult to find an "ideal" setup of the GMRES algorithm for a given problem, i.e. especi...
How does MATLAB, for instance, calculate the SVD of a given matrix? I assume the answer probably involves computing the eigenvectors and eigenvalues of A*A'. If that is the case, I would also like to know how does it compute those?
Recently when I was solving a system of ODEs using runge-Kutta method , I got much different results when I transformed the variables from spherical coordinates ($r$ and $\theta$ ) to cylindrical coordinates($\rho$ and $z$) and solved it again. (no need to mention that $cos(\theta)=\frac{z}{\sqrt{z^2+\rho^2}}$ $r=\sqr...
I have a transient flow and solute transport simulation running using a fortran code. The final solution time is 1 day. I need the output of hydraulic head for the output time of 0.5 day. I want to know what is going to change in my output data (0.5 day) if I run the same simulation for a longer time, e.g., 1000 days? ...
I'm looking for the best package for doing the following: building a 3D model (or loading externally) of a non-standard windmill shape, simulating an airflow over the model, and determining the generated torque. Ideally, it would be either open-source, or have a free demo/low-cost version. Nice-to-have, would be one re...
I am working on implicit schemes for Euler equations. Implicit methods allow one to use large CFL values, but is there some way to evolve CFL number from a much smaller value than desired value to avoid errors in initial iterations. There are some strategies available in literature, such as exponential increment. CFL...
According to Wolfram Alpha and the Sage computer algebra system, the following identity holds: $$ \cos\left(\arctan\left(\frac{l_1-l_2}{d}\right)\right) = \frac{1}{\sqrt{1 + \frac{(l_1-l_2)^2}{d^2}}} $$ However, when I tried to verify it with an arbitrary example in NumPy, I noticed a rather large difference in the act...
I am trying to solve some unconstrained nonlinear optimization problems on GPU (CUDA). The objective function is a smooth nonlinear function, and its gradient is relatively cheap to compute analytically, so I don't need to bother with numerical approximation. I want to solve this problem with mostly fp32 maths ops (for...
I intend to solve Ax = b where A is complex, sparse, unsymmetric and highly ill-conditioned (condition number ~ 1E+20) square or rectangular matrix. I have been able to solve the system with ZGELSS in LAPACK accurately. But as the degrees of freedom in my system grow, it takes a long time to solve the system on a PC wi...
This question is extended from this question The original problem is to maximize the Frobenius norm of a matrix product $max_{X\in \mathbb{D}}||B^TXA ||_F$, where $\mathbb{D}$ is the doubly stochastic matrix set One challenge is that the size of matrix $X$ is big and I would like to reformulate it into a low memory re...
I've been having problems designing an effective caching mechanism. The mechanism is to be used as part of a project developing scientific software. The goal is to save computation time by loading results of identical computations done in the past. The problem I've been encountering is how to know if a computation is i...
Is there any preprocessor directives that could be used to use the polylog function? Or is it included in cmath? If so, do you call it by Li or by polylog? EDIT: What I really am trying to do is give an analytical value for the indefinite integral of the function $$ \frac{x^3}{e^{x} -1} $$ which involves polylogarit...
I wrote a Python code which solves a second degree nonlinear differential equation using the Newton iteration method. The code converges to a 2-cycle within 50 or so iterations. The cycle only appears in noticable magnitude in the last half dozen grid points (of ~120). I use Central Differencing for solving a 2 bounda...
I have some issues solving sparse linear equations Ax = b My matrix A is sparse with dimension of 5 million by 5 million. Actually, it is a combination of two matrices. One is tridiagonal and the other matrix has a bigger band. For example the $29450^{th}$ row has non zero diagonal entry. Plus non zero element at $147...
Let's consider the following equation $$X=F_{1}XF_{1}^{T}+...+F_{p}XF_{p}^{T}+C$$ where $p$ is an positive integer and $C$ is a known positive semidefinite matrix. If we augment $F=[F_{1}...F_{p}]$ and $Y=diag (X...X)$, then the equation becomes $$FYF^{T}−[I...0]Y[I...0]^{T}+C=0$$ seems like a generalized Lyapunov equa...
I mean, in handling boxed constraints? In terms of stability, and more importantly, the numerical performance? I have already written some well-optimized and well-tested C/CUDA/C++ codes for several unconstrained optimzation methods. And I use augmented largrangian to handle constraints, however, it looks like bounded...
I am trying to understand the LidarBoost algorithm as explained in this paper (PDF warning). My apologies if this isn't the appropriate exchange; I've posted in DSP, but I didn't get a response there, and the FAQ said that some image processing algorithms are acceptable here. I don't understand how they take the origi...
I have made a standard curve. The X-axis is logarithmic. The y-axis is linear. I have added a logarithmic trendline (y = -1.546ln(x) + 39.254; R² = 0.9906). How can I re-arrange the equation to calculate an unknown X-axis value?
It is well known that, when a system of linear equations is obtained from discretization of partial differential equation, the solution process can be accelerate significantly by multigrid technique. In the smoothing step of a multigrid cycle, relaxation method, such as Gauss-Seidel or Jacobi, is used. However, for rel...
I am trying to follow the Openfoam user guide but I'm stuck at the first tutorial 1. In fact, when I try to run the blockMesh command (using the administrator account), the following appears: Writing polyMesh --> FOAM FATAL ERROR: Failed writing polyMesh. From function blockMesh in file blockMeshApp.C at line ...
I'm trying to get an animated 2D data surface on MatPlotLib. After a bit of search on the internet, i've found an example that almost works: from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np import time def generate(X, Y, phi): R = 1 - np.sqrt(X**2 + Y**2) return np.cos...
I am interested in cases where Conjugate gradient works much better than GMRES method. In general, CG is preferable choice in many cases of SPD (symmetric-positive-definite) because it requires less storage and theoretical bound on convergence rate for CG is double of that GMRES. Are there any problems where such rat...
I need to solve the follwing constrained optimization problem. Is there any MATLAB toolbox which can solve this. minimize $A_1 x$ subject to $A_2 x = 0$ $A_1$ is an $m\times n$ matrix where $m \lt n$ and $A_2$ is a $(n-m) \times n$ matrix. Now if $A_1$ were a row vector, this would reduce to the standard linear-p...
I'm studying the usual wave equation: $$ \frac{\partial^2 \psi}{\partial x^2} - \frac{1}{c^2} \frac{\partial^2 \psi}{\partial t^2} = 0$$ with complex field $\psi$, on a n-dimensional cube region of length $L$, which are $n-1$ spatial dimensions of length $L$, and one time dimension of duration $L/c$. Now i proceed to e...
As stated in the title, I need to make a discrete 3D convolution of two matrix-valued functions. Or, actually, I need to convolve a matrix-valued function with a vector-valued function. That is, I need to compute the discrete version of $(f \ast X)(x)$ for some finite set of $x$'s, where $f:\mathbb{R}^3\to\mathbb{R}^{3...
Suppose I have some matrix A whose SVD I know. Now, I am given B which is A plus some small perturbation. Is there any algorithm which can use the SVD of A as an initial guess to gain speedup in the computation of the SVD of B?
So the theory is straightforward. We have: $$\frac{\partial^2U}{\partial t^2}=c^2 \frac{\partial^2U}{\partial x^2}$$ discretizing it gives: $$\frac{U(i+1,j)- 2U(i,j) + U(i-1,j)}{(\Delta t)^2} = c^2 \frac{U(i,j+1)-2U(i,j) + U(i,j-1)}{(\Delta x)^2}$$ where $U(i,j)$ is $U(t_i,x_j)$ with $t_i=i*\Delta t$ and $x_j=j*\Delta ...
Consider a multivariate polynomial $f(x) = f(x_1, \ldots, x_n)$ with maximum degree $d$. Following the linear symbolic perturbation scheme described in Seidel 1998, I want to evaluate the limit $$\lim_{\epsilon \to 0^+} \textrm{sign}~ f(x + \epsilon y)$$ for some $x,y \in \mathbb{R}^n$. This limit is given by the low...
Variants of this question have been crossposted to Stack Overflow and Mathematics Stack Exchange. Additional answers may be found at these other sites. Computational Science People: I originally posed this as part of a question at https://math.stackexchange.com/questions/379809/is-there-a-name-for-this-function-parit...
Given an energy level $\mu$, I'm looking to calculate the eigenvectors corresponding to the time-independent Schrodinger operator on the torus (that is, periodic boundary conditions)-- $H = -h^2 \Delta + V$ for some nice, bounded potential $V$ -- whose eigenvalues are nearest to $\mu$. I was wondering if there are some...
I want to solve job assignment problem using Hungarian algorithm of Kuhn and Munkres in case when matrix is not square. Namely we have more jobs than workers. In this case adding additional row is recommended to make matrix square. For example in the following link. And here task IV is assumed to be done. But in real...
Wikipedia lists a lot of FFT algorithms: Cooley–Tukey FFT algorithm, Prime-factor FFT algorithm, Bruun's FFT algorithm, Rader's FFT algorithm, and Bluestein's FFT algorithm What are the pros and cons of each algorithms? And which one do you prefer?
I was having this discussion with a colleague of mine a week ago and thought I might as well bring it here to a broader audience. That said, I am not certain this is a kind of question that is appropriate for scicomp. Anyhow, given their abundance and, relatively low prices, has anyone thought of using smartphones for...