# Questions tagged [matlab]

Questions about the numerical programming language MATLAB.

760 questions
Filter by
Sorted by
Tagged with
273 views

### Discontinuous Galerkin - Inhomogeneous Dirichlet B.C. for 1D Poisson Equation

I am trying to get some code working for the 1D Poisson equation using the textbook: Nodal Discontinuous Galerkin Methods Algorithms, Analysis, and Applications. I use the following formulation (for ...
66 views

### How to preserve or recover states meanings in canonical state-space realizations

Let assume that one would like to translate an input-output model, into a state-space one. It is well-known that the process of realization addresses this aspect. Let assume to have the following ...
244 views

### Use SLEPc from Matlab

Is there a direct way to use SLEPc from Matlab? I remember that in some old manuals there was some Matlab interface. However, in the last one, I cannot find any reference to this. For me, it would be ...
137 views

### temperature profile on axial direction of a chamber

I have a task to plot average temperature profile at each cross-section in the axial direction of a combustion chamber. I have $x$, $y$, $z$ coordinates data in excel as well as the corresponding ...
111 views

### Anyone who knows fine neural network code or module for python?

I want to change my main platform from Matlab to Python due to my work, and I mainly used Matlab for the neural network, so I want to do the same thing in the Python either. I used to make my own ...
186 views

### MATLAB Matrix Multiply Efficiency

I am using MATLAB to prototype a few matrix multiply techniques and compare efficiency. Eventually, I will move the prototype codes to C. It is for a homework assignment where we need to write an ...
355 views

### Potential gain - Matlab vs C/C++ - assembly and eigenvalues

I have a Matlab code computing the solution to an eigenvalue PDE. It consists of two parts: assembly of the stiffness/rigidity matrices and solving a generalized eigenvalue problem. I mention that the ...
220 views

### Finite difference method for the electric field of the electron gun

Can anybody help me to find books or MATLAB code examples for solving electric field of the electron gun(fig.1)with finite difference method? Python code examples are also perfect. The electron gun ...
74 views

For testing I would like to solve the equation $$\partial_tA=\nabla^2_xA,\,A_0=\sin(x)$$ In order to solve it, I use an implicit solver $$\left(1-\frac{\nabla^2_x}{2}dt\right)A_{n+1} = \left(1+\frac{... 1answer 649 views ### Crank-Nicolson algorithm for coupled PDEs Assumed I have the following two coupled equations$$\begin{split} \partial_tA&=a_0AB\\ \partial_tB&=b_0AB \end{split} $$but I am not sure how to calculate them. One approach is a crank-... 0answers 257 views ### Why can I not solve the negative advection equation (backwards in time)? Suppose we have the negative, inhomogeneous advection equation:$$\left(\frac{\partial}{\partial x}-\frac{1}{c}\frac{\partial}{\partial t}\right)v(t,x)=u(t,x)\qquad(t\in\mathbb{R}_{+},x\in\mathbb{R})$$... 1answer 471 views ### Interior penalty discontinuous Galerkin Matlab implementation I want to solve the 2D poisson problem using the interior penalty discontinuous Galerkin methods: −∇a(x)(∇u)=0 in Ω. The variational formulation is such that :$$a_{\epsilon}(u,v)=\sum_{K\in T_h}\...
To study an approximation for the heat equation $$\frac{\partial^2 u}{\partial r^2}+\frac{1}{r}\frac{\partial u}{\partial r}+\frac{1}{r^2}\frac{\partial^2 u}{\partial\theta^2}=f(r,\theta)$$ on the ...