Function 'fzero' in MATLAB
How do I solve the following problem?
Equation:
1/f^0.5 = -2log(0.011 + 1/((1.3*10^-5)(f^0.5)) 开发者_如何学运维
Solve for f using the fzero function in MATLAB.
Define a function as:
func1 =@(f) 1/f^0.5 + 2*log(0.011 + 1/((1.3*10^-5)*(f^0.5));
Then do fzero(func1, x0);
. It's not rocket science, but you'll need to find a value of x0
for it to start with. Try 1eN, with N left as an exercise.
精彩评论