# All Questions

1 views

### non-smooth convex c++ solver

I happened to know that there are advanced established techniques for non-smooth convex optimization in research. For example, these two papers: ...
26 views

### Designing a preconditioner for a very Ill-conditionned matrix

I am a physicist with limited numerical methods knowledge and I am trying to speed up the inversion of a very ill-conditioned problem (rcond>10^30). The same sparse square matrix is used repeatedly, ...
16 views

### Numerically boosting between reference frames

I have a question about numerically boosting between reference frames in MATLAB. Simply stated, if I have a function $f(x,t)$, I want to write it in a new frame, ...
35 views

### Need a simple mesh format (for FEA) and a tool to generate the mesh

I want to write a 2D FEA code for my course project and I need to import a mesh (2d, simple quad/tri) on a simple geometry such as a L shaped plate or with a square/circular hole in it, something like ...
30 views

### What is the best method to combine multiple vectored results into one chart?

Currently I am working on my research report where I've done a lot of measurements. For now I have uploaded everything into Matlab and visualise each on chart. Each one consists of 4 lines drawn with ...
27 views

### Checking if convex polytope is nonempty

I am currently running a linear program with MATLAB to determine, by the exitflag of linprog, if two rotated and shifted hypercubes have nonempty intersection. I wondered if this is a waste of time, ...
36 views

### how to pick a submatrix of a sparse matrix quickly(matlab)

I have a large sparse matrix A and i want to pick the submatrix of it to do block jacobi iterations. For the blocks, i have get a matrix Q that contains the index of nonzero entries in its Jth column ...
38 views

### Eigen-unsupported: Levenberg - Marquardt algorithm

I am using Eigen-unsupported: LevenbergMarquardt algorithm. I use this algorithm inside my model. I wrote the minimization code both in MATLAB (using fsolve) and C++ and both gave the similar results ...
26 views

### MAX-SAT and MAX-cut

I have been using MAX-SAT solver to obtain the exact ground state of ising spin glass model: For 1D periodic model, for systems with 50 binary variables and interaction range of 15th nearest ...
43 views

7 views

### Is there an existing library that calculates all modes in a step index fiber? [duplicate]

Before embarking on this task I thought it wise to ask if anyone knows of an existing library that does this. I would be coding it in python and at least for starters work on the assumption that ...
95 views

### Why is my MATLAB code for back-substitution slower than the backslash operator?

I wrote the code below to invert an upper triangular matrix, avoiding any possible multiplication/subtraction by zero. It just uses $\frac{1}{6}n^3+\ldots$ flops instead of $n^3+\ldots$ flops. ...
31 views

### Is there an existing library that calculates all modes in a step index fiber?

Before embarking on this task I thought it wise to ask if anyone knows of an existing library that does this. I would be coding it in python and at least for starters work on the assumption that ...
20 views

### How to code the enumeration of restricted positions on a chessboard?

I am currently studying restriction permutations with regards to chess. In my case, I want to code a program (preferably C) to find out how many ways are there to place $k$ number of rooks (pieces ...
98 views

### Eigenvalues and Timestep restriction

For an equation of the kind $u_t=Au$, time step is usually defined by ensuring that the eigenvalues are within the stability region of the time-stepping scheme employed. If the eigenvalues are on ...
61 views

### Filling out a mesh (for Fenics FEM)

I have been using Fenics to model some simple electrostatic problems, but now I need to simulate more complicated geometries. Assuming I have created a mesh of several objects, and know their ...
31 views

### How to do Outlier Detection for data of an unknown function $f(x)$

Suppose I have an unknown function $f(x)$ that is monotonic, convex and nonlinear by definition. I somehow evaluated it at 1000 different $x$ points. By ploting these data, I found a very obvious ...
70 views

### Optimizing rank computation for very large sparse matrices

I have a sparse matrix such as ...
62 views

In going from double precision to quad (or higher) precision, roughly how much of a performance hit is taken on various architectures and frameworks. Do floating point operations take twice as much ...
38 views

### Proof of corollary to Chinese remainder theorem

I was puzzled regarding corollary 31.29 of the Chinese remainder theorem as presented in the chapter on number theoretic algorithms by Cormen et al. I found another person who asked the same question ...
66 views

### convex optimization with objective function given by oracles

Is there any solver for convex optimization in C++ (or some dedicated scheme while no solver is yet available) that could solve a convex optimization problem with objective function value given by an ...
63 views

### Nonlinear ODE to solve Duffing's equation

I am trying to solve the Duffing's equation in MATLAB. $m\ddot{y}+c\dot{y}+ky+k_{3}y^{3} = f(t)$ where $f(t) = A \sin{\omega t}$ To do that I wrote a function to be given to the ode45. ...
84 views

### Inverse advection-diffusion problem, solving for a drift coefficient with experimental data?

I am investigating a physical process where I believe the 1-D advection-diffusion equation: \frac{\partial u}{\partial t} = -\frac{\partial}{\partial x}[\mu(x,t) u(x,t)] + ...