Hold on Not showing all of my plots on one graph
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ari Henderson
am 4 Feb. 2020
Beantwortet: Ari Henderson
am 4 Feb. 2020
Q = .07; %(kg/s)
H = 225; %(m)
x = 0.2:10^-3:100;
Bx = 0.2:10^-3:100;%(km)
y = 0 ;%(km)
z = 0; %(km)
U = 3.1 ;%(m/s)
a = 68;
b = .894;
if x < 1 %(km)
c = 33.2;
d = .725;
f = -1.7;
else c = 44.5;
d = .516;
f = -13;
sigmay = a*x.^b;
sigmaz = c*x.^d + f;
Ba = 156;
Bb = .894;
if x < 1 %(km)
Bc = 106.6;
Bd = 1.149;
Bf = 3.3;
else Bc = 108.2;
Bd = 1.098;
Bf = 2.0;
Bsigmay = a*Bx.^b;
Bsigmaz = c*Bx.^d + f;
loglog(Bx,Bsigmay,'b')
hold on
loglog(Bx,Bsigmaz,'r')
hold on
loglog(x,sigmay)
hold on
loglog(x,sigmaz)
end
end
I am trying to plot for lines on one graph but only two lines are showing up. I have used the "hold on" command but it still only plots two lines instead of four.
0 Kommentare
Akzeptierte Antwort
Alex Mcaulley
am 4 Feb. 2020
Take a look at the variables you are plotting, they are duplicated. I mean Bsigmay is equal to sigmay, Bsigmaz is equal to sigmaz and Bx is equal to x. Then, your lines are overlapped and you can see just two lines.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Line Plots 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!