Error Msg: Subscript indices must either be real positive integers or logicals
Show older comments
B=1.21; mu=.92; ct=8.72e-6; poro=.21; rw=4/12; h=50; pi=5000; s=0; k=200; ra=sqrt(100^2+500^2); rc=sqrt(300^2+500^2); qa=300; qc=500; pwfb=zeros(1,10000); hold on
for t=0.1:0.1:1000 i=t*10; if t<48 pwfb(1,i)=pi-(70.6*qa*B*mu/k/h)*expint(948*ra*ra*poro*mu*ct/k/t); else pwfb(1,i)=pi-70.6*qa*B*mu/k/h*expint(948*ra*ra*poro*mu*ct/k/t)-70.6*qc*B*mu/k/h*expint(948*rc*rc*poro*mu*ct/k/(t-48)); end end
I get the error mentioned above when I run this code. The error is in line after the conditional IF.
Can someone please explain this error and how to overcome it.
I need to plot all the values that I get from PWF againt T.
Thanks alot!
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!