0
$\begingroup$

I assume this is a simple problem, but since I don't have a strong maths background, I have trouble to implement this in matlab. Could anyone help me with it? Many thanks!

The concentration of a molecule A can be written as a convolution of of the diffusion equation solution with continuous sources. The concentration of A at position r at time t is

enter image description here or simply speaking

enter image description here , where f is the function of the continuous point source and h is the diffusion function.

I want to plot the concentration of A versus time t and also I need to use this equation to produce A(r,t) for a set of ODEs.

$\endgroup$
2
$\begingroup$

Hint: define some discrete time interval for t and scale the $t_i$ as you want ($t=[t_0,t_1,..., t_m]$). Do the same with $\tau=[\tau_0,\tau_1,..., \tau_n]$, for each $t_i$ evaluate $d_i=t_i-\tau$ then Evaluate $f(\tau)$ and $h(d_i)$ then call this function in Matlab:

$c = conv(f,h)$

Notice that the shape of $c$ will not be the same as the one of $f$ and $h$, you can just consider the data of the area of interest.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.