Skip to main content

Questions tagged [matlab]

Questions about the numerical programming language MATLAB.

Filter by
Sorted by
Tagged with
0 votes
1 answer
97 views

I am working in computational mechanics and I am working on a semi analytical solution for fracture in curved thin shells. I am implementing the solution in Matlab. TL;DR: are there strategies to ...
DesperateGrad's user avatar
0 votes
1 answer
86 views

Consider a full-row rank matrix $A \in \mathbb{C}^{r \times n}$ (where the number of rows r is less than the number of columns n). How can we find a column permutation or an invertible transformation ...
ruoqisun650's user avatar
0 votes
0 answers
37 views

Consider a full-row rank matrix $A \in \mathbb{C}^{3 \times 7}$,How can we find a column permutation or an invertible transformation T such that TA has the following form: $ \left[ \begin{array}{...
ruoqisun650's user avatar
0 votes
0 answers
51 views

I’m reading the paper Explicit estimates for the Riemann zeta function close to the 1-line (arXiv:2312.09412), and on page 6, the authors define the following expressions: $w_1 \geq max _{t\geq t_0}\...
Fatima Majeed's user avatar
2 votes
1 answer
136 views

I have a solution vector $$\begin{equation}H^{(\text{LR})}:= \frac{1}{\Delta x^{2}}\sum\limits_{n=1}^{N}\sum\limits_{m=1}^{N}\frac{u_{n}u_{n+m} + v_{n}v_{n+m}}{m^{1+\alpha}}\end{equation}$$ where $u_k$...
KZ-Spectra's user avatar
0 votes
1 answer
83 views

My scenario is that a pipe is full of a fluid (similar properties of water). A solute is introduced to the inlet at time t=0 and given time to disperse throughout the pipe. The solute cannot leave and ...
Jcm12's user avatar
  • 1
1 vote
0 answers
78 views

In Constantine A. Balanis book about Antenna, he introduced the method of moments for current distribution over finite dipole. However, I found that the method of moments works well for a half-...
kile's user avatar
  • 121
0 votes
0 answers
63 views

So I have this code where I am creating two surfaces using zernike coefficients and polynomials. Now I want to connect them and make it as a solid object. How can I do that in Matlab? The ...
dazemood's user avatar
1 vote
0 answers
68 views

I hope I am in the right place! I am trying to solve an indertminate beam using the finite difference method in MATLAB. I am using the fourth order equation to do this: enter image description here My ...
user50926's user avatar
1 vote
1 answer
98 views

Say I have a discrete non-linear programming problem, $$ \min_\textbf{x} \quad \Sigma^N_{n=0} J(\textbf{x}_n)$$ with $\textbf{x}_n = [x_1, x_2]_n$, and some non-linear constraints on $x_1$ and $x_2$. ...
WesT's user avatar
  • 13
2 votes
0 answers
76 views

My question is very similar to the one previously posted here. I'm using the same MATLAB code for embedding Lapack functions into my code, which I also compiled with Mingw64. The main difference is ...
Leo's user avatar
  • 21
4 votes
3 answers
229 views

we can first conduct spectral decomposition of an positive definite isotropic tensor $A$ and then we can define $\ln(A)$, then we can define the frechet derivative of it, but how to calculate this in ...
YuerWu's user avatar
  • 231
2 votes
0 answers
137 views

I am following this guide to create a simple cfd solver for incompressible 2D fluid in a square cavity. The following Matlab code sample from the guide creates a Laplacian (coefficient) matrix with ...
Lit_try's user avatar
  • 21
0 votes
0 answers
56 views

I have just been able to plot several surfaces using the code below. What I want is a plane or a surface that connects the black and yellow region in the output of the code below: ...
vidyarthi's user avatar
  • 111
2 votes
1 answer
96 views

I have an improper integral which contains Bessel functions, Cosine term as well as a rapidly decreasing exponential term. This is the integral: $$\frac{1}{2\alpha}\int_{0}^{\infty}e^{-\frac{\xi^2}{4\...
ishan_ae's user avatar
1 vote
1 answer
148 views

I would like to report an issue which may be interesting in computational physics. Sometimes, to save time and memory, we use eigs() to calculate the first several ...
basic nutshell's user avatar
0 votes
0 answers
66 views

Where can one find Prof A. Stanoyevitch's finite difference based PDE matlab code? They have a book on such a topic but can't find the accompanying code. Is it well received? It's not commonly talked ...
feynman's user avatar
  • 325
1 vote
1 answer
146 views

The graph plots the X coordinate of the synchronized Lorenz chaotic system. I am self learning by reading research articles on how to synchronize identical chaotic systems. But as seen from the figure,...
Sm1's user avatar
  • 119
0 votes
1 answer
125 views

Where can one find Prof Lawrence Shampine's hpde matlab code? Is it well received? It's not commonly talked about.
feynman's user avatar
  • 325
0 votes
0 answers
48 views

I wanna use matlab live scripts to run a loop updating an animation because this will allow to playback the animation. In the normal command window or m files one can use uicontrol to stop loops or ...
feynman's user avatar
  • 325
0 votes
1 answer
133 views

Which of ode23, 45, 15s, 15i in matlab are dissipative or anti-dissipative for conservative ODEs? Do they STAY dissipative or anti-dissipative for ALL conservative ODEs nor not? If not, what about for ...
feynman's user avatar
  • 325
1 vote
1 answer
104 views

I am struggling with an assignment concerning Newton's method. We are to approximate 3 intersection points using intersecting circle coordinates P1, P2 and P3, using Newton's method. And I can do that ...
rawestan's user avatar
0 votes
1 answer
111 views

I am trying to use a shooting method to compute the shape of liquid-gas interface given by the following differential equation: $$ \frac{d^2 \theta}{ds^2} = \frac{f(\theta)}{h(h + 3\lambda)} $$ with $\...
Sthavishtha Bhopalam's user avatar
0 votes
0 answers
79 views

I am trying to use matlab and YALMIP to solve a graph learning problem of recovering eigenvalues from the eigenvectors of the covariance of sampled graph signal data. This is to implement the ...
user86422's user avatar
1 vote
1 answer
205 views

I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
user46892's user avatar
0 votes
1 answer
164 views

I have an array of data whose columns are solution vectors to a system of ODEs at a specific time. I want to plot the power spectrum of a solution at a specific time, but when I attempt this I get ...
KZ-Spectra's user avatar
4 votes
0 answers
146 views

Setup The 1D convection-diffusion equation is given by: \begin{equation}\tag{1} \frac{\partial u}{\partial t} + v \frac{\partial u}{\partial x} - \mu \frac{\partial^2 u}{\partial x^2} = 0, \end{...
VIVID's user avatar
  • 91
1 vote
1 answer
132 views

I wrote this code to find Cholesky factorization of a symmetric positive definite matrix in MatLab: ...
Ferran Gonzalez's user avatar
9 votes
3 answers
4k views

Suppose we want to calculate $\sqrt{a^2+b^2}-|a|$ in MatLab. Using sqrt(a^2 + b^2) - abs(a) will have some problems: If a or <...
Ferran Gonzalez's user avatar
1 vote
0 answers
128 views

I am trying to solve the following PDE using the method of lines to discretize space, and then solve it as system of ODEs at each point in space using ODE15s: subject to and initial condition $w(z,t=...
Zoe's user avatar
  • 11
2 votes
0 answers
89 views

NOTE: This code is a piece of code I am using for a master's thesis, so I do not expect someone to do the work for me, but I gladly accept suggestions of any kind. However, I am trying to get the ...
SimoPape's user avatar
0 votes
1 answer
146 views

For this electrical circuit: The voltage $ V_D $ can be found by solving a nonlinear equation: $$ \frac{V_{DD}}{R} - \frac{V_D}{R} - I_se^{V_D/V_T} = 0 $$ In this example, let $R=1000$, $V_T = 0.025$,...
Astor Florida's user avatar
2 votes
1 answer
271 views

I'm currently using ode15s to solve a set of stiff differential equations. I am trying to use the MATLAB profiler to understand the section of the ode solver code which calls BLAS routines. Since the ...
Natasha's user avatar
  • 463
1 vote
2 answers
272 views

I am reading through the documentation of matlab function eigs specifically the function handle input version. Here it is: https://www.mathworks.com/help/matlab/ref/...
user8469759's user avatar
2 votes
0 answers
108 views

Question: How much would a simplified feed model in an EM simulation alter an antenna's directivity and the E-field phase reading when compared to using a more complicated/realistic feed model? I am ...
Xingda Chen's user avatar
4 votes
3 answers
345 views

Disclaimer: I previously posted this on SO, but though it would be more relevant for scicomp. The original post has been deleted. I have been trying to recreate the functionality provided by MATLABs <...
two_Thomas's user avatar
0 votes
0 answers
100 views

I'm having a program to compute the solution for a fluid-structure interaction model (blood and blood vessel walls) using FEM in MATLAB. The program is running fine but the function that I'm ...
AgentOrange's user avatar
1 vote
0 answers
127 views

When using the eigs function in MATLAB, which is based off of ARPACK, one can manually modify the maximal dimension of the constructed Krylov subspaces, the maximum iteration counts, and the error ...
user45844's user avatar
0 votes
0 answers
102 views

I need to implement in C a method of obtaining transient solution of damped FE models based on modal results for a structural model (imported CAD geometry) defined with hysteretic (structural) damping....
Piotr's user avatar
  • 1
0 votes
1 answer
78 views

Here is the code that I am trying to run: ...
vidyarthi's user avatar
  • 111
0 votes
2 answers
161 views

So I have this code where I am designing a hollow hemispherical shape and I want to create a 3D volume to input it into FEBio software. I am using delaunay triangulation for meshing. But the problem ...
dazemood's user avatar
3 votes
1 answer
710 views

Say that I have a generalized eigenvalue problem of the form $$Ax=\lambda Bx.$$ Using MATLAB, some naive ways that one may solve this is by either directly inverting $B$ then applying the ...
user45844's user avatar
0 votes
0 answers
81 views

I'm trying to use this method Plot 2D piecewise constant in matlab in a finite elements mesh for my data. However, I have problems with the values of n1, n2 and n3. I guess this is why it doesn't show ...
AgentOrange's user avatar
0 votes
2 answers
218 views

I have a $D$-way tensor of dimensions $n\times n \times \dots \times n$ $(D)$- times. I want to sum the First vectors in all directions. For example, let $\boldsymbol{H}$ is 3-way tensor of dimensions ...
Neuling's user avatar
  • 35
3 votes
3 answers
266 views

I tried to compute the value of the following expression in Matlab: $$ 2^l\sum_{i=0}^{n-1}{N\choose i}\varepsilon^i(1-\varepsilon)^{N-i} $$ where $N=16272$, $n=499$, $l=107$, $\varepsilon=0.02$. I ...
Alex Cage's user avatar
1 vote
0 answers
90 views

I am trying to implement beam propagtion method in a two-dimensional lattice to solve Helmholtz equation by following the scheme given this paper. I am using Matlab for implementation. The expected ...
Yashab Yadav's user avatar
3 votes
1 answer
219 views

I am considering the problem of simulating the evolution of an interface given as a curve in 2D (or surface in 3D) that evolves according to a velocity specified at the interface of the form: $$\vec{v}...
B0bby31's user avatar
  • 33
0 votes
1 answer
247 views

I am trying to use Matlab's pdepe.m to solve the first order parabolic PDE $$\frac{\partial u}{\partial x}+\frac{\partial u}{\partial x}=x$$ I have not had trouble coding the argument of pdepe @pdefun:...
Walden Marshall's user avatar
5 votes
1 answer
275 views

I need to compute an eigendecomposition of an $n\times n$ matrix $$ D + c vv^\top = Q\Lambda Q^\top \tag{1} $$ in MATLAB, where $D$ is a real diagonal matrix, $c$ is a scalar, and $v$ is a real vector....
eepperly16's user avatar
1 vote
0 answers
84 views

I have a problem where I heavily need to restrict the number of points at which I sample a function based on the values of a different function. I have two functions: $f:{\mathbb{R}\times [0,\infty)\...
blockchain187's user avatar

1
2 3 4 5
17