Finding the Value of S in Matlab Code

  • Context: MATLAB 
  • Thread starter Thread starter flyinwelshman
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The forum discussion focuses on solving for the variable S in a MATLAB code snippet that involves iterative calculations. The user struggles with the dependency of the variable Us on S, which complicates the evaluation process. The provided equations include calculations for V, Us, Vcr, I, J, and the final expression for S. The conclusion emphasizes that additional information is necessary to determine a definitive value for Us, as it is inherently linked to S.

PREREQUISITES
  • Understanding of MATLAB programming and syntax
  • Familiarity with mathematical modeling and iterative methods
  • Knowledge of logarithmic functions and their applications
  • Basic grasp of fluid dynamics principles relevant to the equations
NEXT STEPS
  • Research iterative methods in MATLAB for solving equations with dependencies
  • Learn about MATLAB's symbolic math toolbox for handling variable dependencies
  • Explore numerical methods for root-finding, such as Newton-Raphson in MATLAB
  • Study fluid dynamics equations relevant to the variables used in the discussion
USEFUL FOR

This discussion is beneficial for MATLAB programmers, engineers working on fluid dynamics simulations, and anyone involved in mathematical modeling requiring iterative solutions.

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
We would have required more information than what you've provided. As you require a definite value of ##Us##, and that is a function of ##S##, this method will not work.
 

Similar threads

Replies
6
Views
4K
  • · Replies 41 ·
2
Replies
41
Views
10K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
5
Views
8K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K