Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Help with while loop
Posted:
Sep 12, 2013 11:56 AM


Please help with trying to make the while loop work
e =0.0015; D =50; V =2; Dm =0.05; v =1.01*10^6; Re = V*Dm/v; N =1000; f = linspace(0.008,0.1,N);
i = 0; f_abs = 1; FF = 0.008; while FF(end) < f_abs; i = i + 1; FF = log(e/D/3.7 + 2.51*Re*sqrt (f(i)))*sqrt(f(i))*2; end
My aim is to iterate through f until the equation or FF is equal to 1 or less than .001 away from 1. Please note i am a beginner user and have no prior programming knowledge
Thanks Jimmy



