# Questions tagged [matlab]

Questions about the numerical programming language MATLAB.

157 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0answers
599 views

### Numerical implementation of the Dirichlet-to-Neumann map

I am solving the Dirichlet problem $$\begin{cases} \Delta u = 0, \\ u|_{\partial D} = f, \end{cases}$$ in a $2d$ domain $D$ using the finite element method. What I want to get is the ...
0answers
164 views

0answers
65 views

### Why the two Gram-Schmidt algorithms produce different results for qr factorization?

For the qr factorization using classic Gram-Schmidt algorithm, I found the 2 different implementations below. The first one uses the for loop to compute the upper ...
0answers
74 views

### Complex Integral Equation Solution in MATLAB

I need to solve an integral equation in the form: $$A(z)+\int\limits^{z_2}_{z_1}B(z') \frac{z^N}{z^N-z'^N} \frac{e^{i\beta}}{|z|}\mathrm{d}z'=0$$ where $A(z)$ distribution is known and we are ...
0answers
169 views

0answers
1k views

0answers
364 views

### C60 orbital calculation

I am currently trying to reproduce the results published by Hands et al.1 using MATLAB. They calculated the bases of the C60 wave functions of HOMO, LUMO and LUMO+1. I did the following: I ...
0answers
407 views

### Calculate Integral Using Gauss Jacobi Quadrature or otherwise

I need to integrate the following integral: \begin{align} I = \int^z\frac{1-\zeta^2}{(1+\zeta^2)(\zeta-\zeta_l)(1-\zeta_l\zeta)}\prod_{k=2}^{n-1}\left ( \frac{\zeta-z_k}{1-\zeta z_k} \right )^{-\...
1answer
2k views

### 2D cross section from 3D surface

I am trying to apply the "restoring force surface" method to a dynamic linear system. The idea behind this method is that, knowing acceleration, displacement, velocity and input force it is possible ...
0answers
3k views

### Numerical integration and filtering of acceleration experimental data

I have a vector containing acceleration measurements and the corresponding vector of times in which measurements are taken. To obtain velocity and displacement I used the cumtrapz() function already ...
0answers
317 views

### Efficient assembly of finite element matrix(coupled equations case)

I noticed this post, where spalloc and sparse are recommended for efficient assembly in Matlab. I personally use sparse ...
0answers
117 views

### Spatio-temopral wavelet analysis

Am quite new to wavelet analysis and would like some help. I am performing a spatio-temporal analysis of monthly gridded rainfall data. With PCA, I can reduce the dimension of the rainfall data into a ...
0answers
360 views

### Transport Equation in a Tube: Source Term on Boundary

I'm modeling mass transport in a flow reactor. The flow reactor is a tube, which allows me to use cylindrical symmetry in solving the Convection-Diffusion-Reaction (CDR) Equation, which governs the ...
0answers
26 views

### Problem with Numerical DAE Implementation of Nernst-Planck Equations

I write to you all today in order to clarify if I implemented my model correctly into MATLAB. I will outline the following: analytical governing equations, my discretization for the equations and ...
0answers
42 views

### How to solve this boundary value problem which has more unknown than equation on MATLAB

I need your helps about solving the problem below with MATLAB. I am trying to solve 2D Stress Wave Propagation problem by using FDTD(Finite difference time domain) method on the cylindrical coord. I ...
0answers
36 views

### How to curve-fit the lower envelope of random sequence?

I'm more or less familiar with procedures and methods to fit a curve to experimental data, and I have done this many times using Matlab. However this time I have a problem that I'm not sure how to ...
0answers
72 views

### If dot product is commutative, why does MATLAB give different answers?

Why does the dot() function in MATLAB return different expressions based on the order in which I pass vectors?
0answers
58 views

### Modelling of Stefan Maxwell equation

I am trying to solve Maxwell Stefan's equation over a membrane to get the transient mole fraction distribution over the membrane thickness 'z'. But somehow I am not able to code it using ODE45, more ...
0answers
59 views

### How to determine the finite difference coefficient matrix in 2D with periodic BC?

I'm solving a PDE in matlab using ode15s, and since the spatial dimension is 2, and number of variables grow large very quickly, I need to supply the structure of ...
0answers
235 views

### Extracting FEM matrices in matlab pde toolbox

I am trying to follow the dynamic linear elasticity in Matlab, link here. My goal is to extract the FE Matrices using the function assembleFEMatrices in matlab and solve the resulting system of second-...
0answers
24 views

### Why I am not able to generate Levy distribution using inverse transform method on MATLAB?

I am trying to generate random numbers using Levy distribution in MATLAB. I am using the inverse transform method to generate random numbers and then plot its histogram for pdf estimation. Then I ...
0answers
82 views

0answers
89 views

### Bracket Algebra, Straightening Algorithm

My apologies if the question is simple. I need to write a code for straightening algorithm. Which includes defining bracket algebra. I tried to write it in CoCoA-5, but it wasn't possible because ...
0answers
303 views

### ARPACK gives different answers from Matlab and NAG

I'm playing with ARPACK. I looked into the examples they provide, zndrv4.f illustrating the usage of the routine znaupd, in the directory of ARPACK/EXAMPLES/COMPLEX/. I also came cross NAG Fortran ...
0answers
2k views