Calculating Stream Depletion using changing pumping rates over time
Show older comments
Here is my code:
data = xlsread('SDRWellsFrenchGWbasinQw.xlsx');
Length =data (:,6); %distance between well and stream [m]
S =data(:,5); %storativity of aquifer [1]
T=data(:,4); %transmissivity of aquifer [m2/d]
t=(n-1934)*365;tn=0:365:27375; SDRJenkins1934=0; for n=1935; dt=t-tn; arg2=sqrt((S.*Length.^2)./((4.*T)*(dt))); SDRJenkins=(SDRJenkinsn-1)+(data(:,n-1927)).*erfc(arg2);
end
The problem, i think, is with SDRJenkins=..., the n-1. I'm trying to do a summation where n=year i want to calculate SDRJenkins.
The summation should be:
SDRJenkins_1935 = SDRJenkins_1935-1+data.*erfc(arg2)
or SDRJenkins_1936=SDRJenkins_1936-1+data.*erfc(arg2)
Answers (2)
Sean de Wolski
on 3 Aug 2011
0 votes
rethink your variable naming strategy and do everything with vectors and, if necessary, for-loops.
JP
on 11 Aug 2011
0 votes
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!