Multiple Equations
Mostrar comentarios más antiguos
Hi, I'm really rather new to Matlab, and totally confused. I'm trying to write some equations for evapotranspiration, and I'm rather stuck. I've got my constants and my equations written as below:
gs = 0.108; %stomatal conductance m^-1%
ga = 0.002; %atmospheric conductance m^-1%
G = 0; %soil heat flux W m^-2)%
rho = 1.22; %density of air Kg m^-3%
cp = 1006; %specific heat of air J Kg^-1 degrees C^-1%
gamma = 0.655; %psychrometric constant%
pw = 998; %density of water KG m^-3%
lambda = 2495000; %latent heat for vapourisation J/kg%
Dry = -100 : 100; %Dry Bulb temperature degree C%
sat = 0.611 * exp ((17.27 * Dry)/... %Saturated vapour pressure KPa%
237.3 + Dry);
delta = 4098 * sat / ...%slope of vapour pressure curve at air temperature%
(237.3 + Dry)*(237.3 + Dry);
Rs = 0 : 40000; %Incoming Radiation W m^-2%
Wet = -100 : 100; %Wet Bulb temperature degree C%
Rn = -18.308 + 0.681 * Rs; %Net radiation W M^2%
Unsat = 0.611 * exp ((17.27 * Wet) /... %Unsaturated vapour pressure KPa%
(237.3 + Wet));
Vap = Dry - Wet; % Vapour Pressure Deficit KPa%
Soil = Rn * 0.2; % Soil heat flux%
E= (delta * (Rn - Soil) + (rho * cp * Vap * ga)...
/ (delta + lambda * (1 +(ga/gs))))
Hours = 1:1:23; % Hours in a day%
Secs = Hours * 3600; %seconds in an hour%
Evap = (E/ (lambda * pw)) * 1000 * Secs %Evapotranspiration (mm per day)
My problem however is now that I want to be able to enter my 4 variables, Dry, Rs, Wet and Hours, and solve the equations, but I don't really know how to do it.
I eventually hope to make it into a GUI but I'm just trying to take it one step at a time. Any pointers would be much welcome.
Thanks
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Agriculture en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!