Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following data was collected for the steady flow of water in a concrete circ

ID: 3758572 • Letter: T

Question

The following data was collected for the steady flow of water in a concrete circular pipe:

Diameter, m: 0.3, 0.6, 0.9, 0.3, 0.6, 0.9, 0.3, 0.6, 0.9

Slope, m/m: 0.001, 0.001, 0.001, 0.01, 0.01, 0.01, 0.05, 0.05, 0.05

Flow, m3 /s: 0.04, 0.24, 0.69, 0.13, 0.82, 2.38, 0.31, 1.95, 5.66

Use Matlab code for multiple linear regression to fit the following model to this data: Q0 = a0*Da1*Sa2 , where Q = flow, D = diameter, and S = slope. Submit program or print out of command window with final expression.

Explanation / Answer

load carsmall
%Here the data declaring arrays
D = [0.3 0.6 0.9 0.3 0.6 0.9 0.3 0.6 0.9 ];
S = [0.001 0.001 0.001 0.01 0.01 0.01 0.05 0.05 0.05]
F = [0.04 0.24 0.69 0.13 0.82 2.38 0.31 1.95 5.66]


a = [1 1 1 1 1 1 1 1 1] % Removes NaN data


scatter3(D,S,F,a,'filled')
hold on
Dfit = min(D):100:max(D);
Sfit = min(S):10:max(S);
Qfit = min(F):10:max(F);
[DFIT,SFIT,QFIT] = meshgrid(Dfit,Sfit,Qfit); %creating mesh grid
QFIT = a(0)*DFIT*a(1)*SFIT*a(2); %here model calculation
mesh(DFIT,SFIT,QFIT)
xlabel('Diameter') %labels declared
ylabel('Slope')
zlabel('Flow')
view(50,10)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote