# MATLAB ODE/PDE's in Matlab

1. Mar 31, 2010

### n0_3sc

I have two PDE's. One in terms of dz and the other in terms of dt:

$$\frac{dI(t,z)}{dz}=aI(t,z) + bI^2(t,z) - cN(t,z)I(t,z)$$
and
$$\frac{dN(t,z)}{dt}=dI^2(t,z) - eN(t,z)$$

I know the function:
$$I(t)$$

I'd like advice on how to attempt this problem on matlab using the pde function. (Matlab's examples are too complex to follow).

2. Apr 3, 2010

### falfermart

I might be able to help given that I know at least a little about diff eq.s in matlab, but first:

you say you know I(t), but in your equations I appears as a function of two variables. And if you know THAT function, then what's the use of the first equation?

3. Apr 3, 2010

### n0_3sc

Because I know I(t) the first equation determines how I(t) varies with z thus giving I(t,z).

I should also mention letters on the rhs "a,b,c,d,e" are constants.

4. Apr 3, 2010

### falfermart

I'm still not quite getting it. When you say that you know I(t), do you mean that you know I(t,0) or something like that?

5. Apr 3, 2010

### n0_3sc

Yeah sorry it can be a bit confusing when solving a pde in this way.

Here's what I(t) is:
$$I(t) = I_{max}exp(\frac{-t^2}{T})$$

I(t,0) = I(t).

The first ODE modifies I(t) as it varies with z giving I(t,z).

6. Apr 3, 2010

### falfermart

Aha. Okay, got it, thanks. Do you have a similar boundary condition for N(t,z)? I don't think matlab can do much with it if not.

7. Apr 3, 2010

### n0_3sc

Sure, I can think of this one as being a suitable condition:

$$N(t=-\infty,z) = 0$$