Hi, i wonder if there is somebody who can help. I have this program where it calculates pressure inside a cavity. For normal case, the program just took 30 minutes to give result. I did modification to the program where the concerned codes a shown below, could this codes are the culprit where it took 15 hrs to run and give result. a, b, c, d are bessel functions that i dont bother to write here. Note: this is just partial of the program, i doubt other part is the reason because i only change numeric values for them.
HHvp=1e-10;HHvp1=1e-10;HHvp2=1e-10;HHvp3=1e-10;HHvp4=1e-10;HHvp5=1e-10; for m1=1:5 for n1=1:5 for l1=1:5 omega_n(m1,n1,l1)=m1*n1*l1 % a lot more to this, to long to write)
end end end for n1=1:5 for l1=1:5 HHvp1= HHvp1 + a*n1*l1 end end for n1=1:5 for l1=1:5 HHvp2= HHvp2 + b*n1*l1 end end for n1=1:5 for l1=1:5 HHvp3= HHvp3 + c*n1*l1 end end for n1=1:5 for l1=1:5 HHvp4= HHvp4 + d*n1*l1 end end HHvp=HHvp1+HHvp2+HHvp3+HHvp4; Hvp(mmm2,nnn2,lll2,num2)= HHvp;
Best Answer