Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
