I have a differential equation in the form of:
x'(t) + x(t) = u(t)
where x'(t)
is the first order derivative of x(t)
. This is a homework questions which asks to discretize the equation with forward difference approximation, and then to apply the resulting operator over an image (using MATLAB). I'm not asking for the solution, I'm just not clear on how to actually apply the operator to the image.
I replaced x'(t)
with [x(t+h)-x(t)]/h
which I suppose makes the equation discrete, but I don't know how to go further (that is, as I said, apply this operator to an image using MATLAB).
Any help/references I can check out?
EDIT Full text of the exercise:
Yes, your initial ideas are correct.
t is the coordinate along the image row or in the second step along the column. What is not clear with the given choice of h=0.5 is the distance from pixel to pixel. Assuming it is 1 gives a doubling of the image size and requires interpolation between pixels.
As a filter, the solution is obtained via convolution with the sequence
[ 1, exp(-h), exp(-2*h), exp(-3*h),... ]*h
or
[ 1, q, q^2, q^3, ... ]*h
where q is the approximation of exp(-h) resulting from the discretization.
Or inverse convolution with [ 1, -q]
.