- #1
Ein Krieger
- 34
- 0
Hi,
I am trying to incorporate the following equation into Matlab in the red:
http://http://www.radikal.ru][PLAIN]http://s018.radikal.ru/i518/1305/16/1cc0d2a72d38.jpg
The following data is to be used:
t=3000000
nr=nx=161
q=0.02
k=5e-13
mu=0.00035
c=1.5e-8
phi=0.25
rw=0.1
h=4.5
My code is below:
st=size(t)
nr=nx;
for i=1:1:st(1)
rd=r(1:nr)/wb
td=0.0036*k*t(i)/(phi*mu*c*wb^2)
pd=((pi*h*k)/(1.842*q*1.1*mu))*(IP-p(i,1:nr))
Ei_from_mfun=mfun('Ei',1,-rd^2/(4*td))
pd=1/2*Ei_from_mfun
plot(time,pd,'bo')
end
But it gives the following command :
"? Index exceeds matrix dimensions."
Can you please help to fix the problem for every time, t and pressure,p?
Thanks
I am trying to incorporate the following equation into Matlab in the red:
http://http://www.radikal.ru][PLAIN]http://s018.radikal.ru/i518/1305/16/1cc0d2a72d38.jpg
The following data is to be used:
t=3000000
nr=nx=161
q=0.02
k=5e-13
mu=0.00035
c=1.5e-8
phi=0.25
rw=0.1
h=4.5
My code is below:
st=size(t)
nr=nx;
for i=1:1:st(1)
rd=r(1:nr)/wb
td=0.0036*k*t(i)/(phi*mu*c*wb^2)
pd=((pi*h*k)/(1.842*q*1.1*mu))*(IP-p(i,1:nr))
Ei_from_mfun=mfun('Ei',1,-rd^2/(4*td))
pd=1/2*Ei_from_mfun
plot(time,pd,'bo')
end
But it gives the following command :
"? Index exceeds matrix dimensions."
Can you please help to fix the problem for every time, t and pressure,p?
Thanks