| Author |
Comment/Response |
Subramanian
|
09/30/11 4:02pm
a = 106.5;
Pm = 7.75;
delV = 0.216;
se = 0;
delE = 0;
For[r = 0.3, r <= 95, r = r + 0.6
For[z = 0.3, z <= 40, z = z + 0.6
If[(SH[r, z]*Pm) > 0.83,
delE = SH[r, z]*delV;
se = se + delE;
]
]
]
Print[se];
SH[r,z] is a function of r and z and I need this loop to calculate the value of SH[r,z] for each (r,z) and if the condition in If is satisfied, go perform the other operations. I need the final output of se.
Now I am getting the result as 0. Why does the loop not run the way i want it to? CAn someone help?
Thanks
URL: , |
|