Why can't the dots on the plot be connected? I should have two parallel lines in each subplot. Instead I have unconnected dots.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
clear,clc,clf
format long
Q=0.03;
rouh=847;
g=9.81;
Gamma=(rouh.*g);
Zs=0;
Ze=0;
L=500;
Ks=(6*10.^-5);
viscosity=(1.1*10.^-6);
V=1.34:0.5:4.5
for I=1
D=sqrt(((4.*Q))./(V.*pi))
end
Re=(V.*D./viscosity);
Er=(1.*10.^-8);
Fo=0.01;
for I=0:1:10^6;
Fn=(1./(-4.*log10((Ks./(3.71.*D))+((1.26)./(Re.*sqrt(Fo)))))).^2;
E=abs((Fn-Fo)/Fn);
if E<=Er;
display(Fn),display(E),break,
end
if E>Er;
Fo=Fn;
end
end
Hloss=((Fn.*L.*Q.^2)./(12.*D.^5))
Hpump=Hloss
%calculating Hloss every 100M
Hloss=((Fn.*L.*Q.^2)./(12.*D.^5))
Hpump=Hloss
%calculating Hloss every 100M
for HLC=(1:100:500);
HlossN=((Fn.*HLC.*Q.^2)./(12.*D.^5))
TEL=(Hpump-HlossN+Zs)
TEL1 = TEL(:,1);
TEL2 = TEL(:,2);
TEL3 = TEL(:,3);
TEL4 = TEL(:,4);
TEL5 = TEL(:,5);
TEL6 = TEL(:,6);
TEL7 = TEL(:,7);
HGL=(TEL-((V.^2)./2.*g))
HGL1 = HGL(:,1);
HGL2 = HGL(:,2);
HGL3 = HGL(:,3);
HGL4 = HGL(:,4);
HGL5 = HGL(:,5);
HGL6 = HGL(:,6);
HGL7 = HGL(:,7);
subplot(3,3,1)
plot(HLC,TEL1,'+b','LineStyle', '--')
hold on
plot(HLC,HGL1,'+b','LineStyle', '--')
subplot(3,3,2)
plot(HLC,TEL2,'+c','LineStyle', '--')
hold on
plot(HLC,HGL2,'+c','LineStyle', '--')
subplot(3,3,3)
plot(HLC,TEL3,'+m','LineStyle', '--')
hold on
plot(HLC,HGL3,'+m','LineStyle', '--')
subplot(3,3,4)
plot(HLC,TEL4,'+c','LineStyle', '--')
hold on
plot(HLC,HGL4,'+c','LineStyle', '--')
subplot(3,3,5)
plot(HLC,TEL5,'+k','LineStyle', '--')
hold on
plot(HLC,HGL5,'+k','LineStyle', '--')
subplot(3,3,6)
plot(HLC,TEL6,'+g','LineStyle', '--')
hold on
plot(HLC,HGL6,'+g','LineStyle', '--')
subplot(3,3,7)
plot(HLC,TEL7,'+r','LineStyle', '--')
hold on
plot(HLC,HGL7,'+r','LineStyle', '--')
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!