how to understand the gradient vector flow formula? - image-segmentation

Currently, I am learning gradient vector flow. I have one question about the calculation.
After Euler equations, the GVF can be found by solving the following formula:
Then, the paper said: "Equations (8) and (9) can be solved numerically by treating u and v as a function of time." The resulting equations are:
I have no idea how to obtain equation (10) from equation (8). Any suggestion is appreciated~~~

Related

Find point on the Spline Curve in Flutter

I am having some discrete points, by using which I can plot spline curve(Syncfusion chart) in flutter. But now I have to find the point on that curve i.e. by giving values of x, I need value of y. I am stucked here and don't have any algorithm to apply for that. How did they make graph using discrete point ? There should be some algorithm which can be applied here and get those point.
Please help me out
Thanks in advance!!
I am here with a great solution to this problem, So The idea goes like if we have n points for equilibrium data, then we will assume a polynomial of order n-1(For eg. no. of points on equilibrium curve to be 3 then the polynomial should be quadratic of form y= Ax²+Bx+C). Now as we have 3 variables(A, B, C), then to solve this equation we need 3 equations in terms of A, B and C. These equations are obtained by putting the equilibrium data points, in this case 3 points so we will get 3 equations. These three equations can be solved by using Cramer's rule. After solving the equation we will get the equation of the curve.
The equation thus obtained will be more accurate and as cramer's rule can be obtained to any number of equations, then we can easily obtain polynomial equation of any order.This method is quite big and will be time taking to apply.
This will give you the curve for a given number of points

How to solve these differential equations?

I am working on a heat exchanger and found these differential equations from a paper. I never had such equation as you can see even if it's a single order differential equation a term "dy" is always hanging at right side of the equation.
I am trying to solve them in matlab but due to dy, I am not able to put it into an equation.
Can anyone help me to simplify the equation or any help on how such type of equations can be solved in matlab?
These are the equations:
Look at Eqs (23) and (24). They specify the definitions of \dot{m}_p and \dot{m}_s so that when you plug them into Eqs (19) and (20) they lose the floating differentials.

Non linear system of differential equations on MATLAB

I'm new on MATLAB, and I was trying for fun to resolve the Friedmann equations using the Runge-Kutta algorithm.
If you don't know it, the Friedmann equations has the following form:
Friedmann equations for expanding universe
, where the curvature k is given by the values -1, 0 or 1.
Also, the state equation for the pressure p is given by:
State equation for the pressure
So, I have the Runge-Kutta algorithm:
function [t,x,y] =rk_2_1(f,g,t0,tf,x0,y0,n)
h=(tf-t0)/n;
t=t0:h:tf;
x=zeros(n+1,1); %reserva memoria para n+1 element(i)os del vect(i)or x(i)
y=zeros(n+1,1);
x(1)=x0; y(1)=y0;
for i=1:n
k1=h*f(t(i),x(i),y(i));
l1=h*g(t(i),x(i),y(i));
k2=h*f(t(i)+h/2,x(i)+k1/2,y(i)+l1/2);
l2=h*g(t(i)+h/2,x(i)+k1/2,y(i)+l1/2);
k3=h*f(t(i)+h/2,x(i)+k2/2,y(i)+l2/2);
l3=h*g(t(i)+h/2,x(i)+k2/2,y(i)+l2/2);
k4=h*f(t(i)+h,x(i)+k3,y(i)+l3);
l4=h*g(t(i)+h,x(i)+k3,y(i)+l3);
x(i+1)=x(i)+(k1+2*k2+2*k3+k4)/6;
y(i+1)=y(i)+(l1+2*l2+2*l3+l4)/6;
end
end
, but I have three problems:
I don't know how to put symbolically the density \rhoon my function.
I don't know to define the second function g=#(t,x,y), because I have a derivative of a with respect to time.
And the last one, what happens with k=sqrt(-1)? Because I need that result symbollicaly, but I want the whole result numerically.
Sorry if my questions are basic, but I don't know how to do this and I need some advice or help.
Thank u very much :)

Implementation of integral and infinite summation

I am having some trouble with implementing the following equation in Matlab:
The trouble is with using numerical/symbolic variables/implementation.
Can someone please write down the code to help me. Implementation would be great.
The constants for the equation are:
m=1; rho=0.5; H=1; I=1877; sigma=20;
For example if N=2, then:
for n=1, An=0.257, Zn-1=inf, Zn=0.4146;
for n=2, An=1, Zn-1=0.4146, Zn=0.1066;
Thanks for the help.
In numerical methods all infinite quantities are approximated by finite ones. Therefore, you have to study this expression for convergence (analytically or by means of numerical experiment). Once you know the radius of convergence you know which number to pick up to approximate the sign $\infinity$ in sums and integrals. The numerical evaluation of integrals is a large subject itself (you may read any book on numerical methods or specifically on numerical quadratures https://en.wikipedia.org/wiki/Numerical_integration). The simplest numerical approximation of an integral is based on the rectangular rule for a regular uniform grid:
$$\int_a^b f(x) dx=\sum_j f(x_j) \Delta x$$, where $\Delta x = x_{j+1}-x_j$

how to solve first order of system of PDEs in Matlab

I have a set of 4 PDEs:
du/dt + A(u) * du/dx = Q(u)
where,u is a matrix and contains:
u=[u1;u2;u3;u4]
and A is a 4*4 matrix. Q is 4*1. A and Q are function of u=[u1;u2;u3;u4].
But my questions are:
How can I solve above equation in MATLAB?
If I solved it by PDE functions of Matlab,can I convert it to a
simple function that is not used from ready functions of Matlab?
Is there any way that I calculate A and Q explicitly. I mean that in
every time step, I calculate A and Q from data of previous time step
and put new value in the equation that causes faster run of program?
PDEs require finite differences, finite elements, boundary elements, etc. You can also turn them into ODEs using transforms like Laplace, Fourier, etc. Solve those using ODE functions and then transform back. Neither one is trivial.
Your equation is a non-linear transient diffusion equation. It's a parabolic PDE.
The equation you posted has the additional difficulty of being non-linear, because both the A matrix and Q vector are functions of the independent variable q. You'll have to start by linearizing your equations. Solve for increments in u rather than u itself.
Once you've done that, discretize the du/dx term using finite differences, finite elements, or boundary elements. You should start with a weighted residual integral formulation.
You're almost done: Next to integrate w.r.t. time using the method of your choice.
It's not trivial.
Google found this: maybe it will help you.
http://www.mathworks.com/matlabcentral/fileexchange/3710-nonlinear-diffusion-toolbox