- #1
flyinwelshman
- 1
- 0
* Hello I'm fairly new to Matlab and I'm having trouble iterating. I'm trying to find the value S however the equation needed to evaluate it depends on S (second line). What is the best way to find S? Any help would be greatly appreciated :) My code:
Code:
V=Q/(W*R);
Us = (9.81*R*S)^0.5;
if ((Us*d/v)>1.2) && ((Us*d/v)<70);
Vcr=w*((2.5/(log10(Us*d/v)-0.06))+0.66);
else Vcr=w*2.05;
end
I = 5.435-0.286*log10(w*d/v)-0.457*log10(Us/w);
J = 1.799-0.409*log10(w*d/v)-0.314*log10(Us/w);
S=(w*Cts*10^(I/J))/(V-Vcr);
Last edited by a moderator: