Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i have this matlab code . It has a function which with input arguments the diameter d and the flow depth h of the horseshoe
i have this matlab code It has a function which with input arguments the diameter d and the flow depth h of the horseshoe
cross section, returns the wetted perimeter P and the wetted crosssectional area A :function P A horseshoeFlowd h
Calculate h
hd;
if h && h h
Case : h h
A h dh d h dsinh dd pi;
Wetp d cos hd;
elseif h h && h d
Case : h h diameter
hd h;
C;
C CC sinC;
Ah dh d hd sin h d d;
A dCsin h d dh dd dh d A;
Wetp d cosd h dcosC;
Wetp d cosd h dcosC Wetp;
A A;
Wetp Wetp;
elseif d h && h d
Case : diameter h diameter
h d ;
C;
C CC sinC;
Ah dh d hd sin h d d;
Ah dh d hd sin h d d A;
Wetp d cosd h dcosC;
Wetp d cos h d pi Wetp;
A A;
Wetp Wetp;
else
errorInvalid input for flow depth h;
end
Calculate hydraulic radius, velocity, and flow rate
Rh A Wetp;
V n Rhs;
Q V A;
Output wetted perimeter and crosssectional area
P Wetp;
A A;
end
how can I make a code that reads the diameter,depthhmanning,slope and discharge from dat files? for exmple this one named mixdat:MANNING:
DIAMETER: #m
SLOPE: # per cent actual slope is
DEPTH: #m
DISCHARGE: #msec
It has to read other dat files too they are smilar but the have different orders fot the data
thanks! IN MATLAB CODE PLEASE!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started