Questions tagged [matlab]
Questions about the numerical programming language MATLAB.
27
questions
0
votes
0
answers
47
views
1D FDTD simulation of plane wave propagation and the Courant stability condition
I'm currently trying to simulate a simple case of wave propagation in free space before adding in more complexities, and already I'm stumped. I understand the Courant stability condition. However, I ...
4
votes
3
answers
134
views
Is there any matlab built-in function or libraries to calculate $\frac{d(\ln A)}{dA}$?
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 ...
2
votes
0
answers
58
views
2D cavity flow: Adding zero Dirichlet condition to the top boundary leads to NAN
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 ...
0
votes
0
answers
38
views
A plane or surface passing through two surfaces in MATLAB
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:
...
2
votes
1
answer
68
views
What would be the right approach to numerically integrate in MATLAB an improper integral with Bessel function?
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\...
1
vote
1
answer
77
views
'eigs()' in Matlab gives inaccurate eigenvector when only several eigenvalues are calculated
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 ...
0
votes
0
answers
53
views
Prof A. Stanoyevitch's finite difference based PDE matlab code
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 ...
1
vote
1
answer
106
views
Educational Purpose: How to synchronize chaotic systems
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,...
0
votes
1
answer
95
views
Prof Lawrence Shampine's hpde matlab code
Where can one find Prof Lawrence Shampine's hpde matlab code?
Is it well received? It's not commonly talked about.
0
votes
0
answers
30
views
How to stop loops or close figures in live scripts in matlab
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 ...
0
votes
1
answer
69
views
ode23, 45, 15s, 15i in matlab for conservative ODEs
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 ...
1
vote
1
answer
79
views
Multivariable Newton's method for-loop
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 ...
0
votes
1
answer
86
views
shooting method to compute the interface shape
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 $\...
0
votes
0
answers
62
views
Help with inferring Network topology from Spectral templates
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 ...
1
vote
1
answer
122
views
Step size constraint in Euler backward
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 ...