function l = spectrum(t,N)
phi= 2 * 10^12;
function j= photons(x,z)
kbg= K * exp(-s*(x - 484));
I= Iin * exp((-Kw*z) -(kbg*z) -(k*N*z));
y = integral (@photons,400,700);
function d = growth (z)
d= pmax * ((y/(pmax/phi)) + y) - L * N;
dNdt= (N/zm)* integral(@growth,0,10);
l = dNdt
I'm trying to recreate the differential equations in the attached PDF but when I try to use ode45 to solve I'm receiving an error "Not enough input arguments" in line 19 (equation I within function j). If I define either x or z as some value then the code works but I need both x and z to be undefined because I need to integrate over x from 400 to 700 and over z from 0 to 10. I tried defining x and z as elements of an array Y, but that returned "Index exceeds number of array elements (1)" as an error.
I don't think this code is optimized in any way but I'm mainly curious as to how I can get x and z to be accepted as undefined variables in order to eventually integrate over them. Any help or advice would be appreciated!