Finding the Value of S in Matlab Code

  • Context: MATLAB 
  • Thread starter Thread starter flyinwelshman
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
flyinwelshman
Messages
1
Reaction score
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:
Physics news on Phys.org