I want to plot 5 parts in a single graph using a piecewise function. But I am not able to plot the last one. Can anyone please help me with it? The code is as follows.
Es = 2*10^5;
Ep = Es;
Ec = 40000;
fck = -50;
ϵbed = 6.975*10^-3;
ϵc0 = (2*fck)/Ec;
Ap = 2*π/4*13^2;
As = 4*π/4*22^2;
Ac = 300^2 - (Ap + As);
fctk = 2.9;
ϵs = ϵc;
ϵps = ϵc + ϵbed;
fpy = 200*10^3*ϵps*{0.025 + 0.975/(1 + (118*ϵps)^10)^0.1};
fsy = 420;
σc1 = fck*(1 - 0.15*((ϵc - ϵc0)/(0.0038 - ϵc0)));
σc2 = fck*((2*ϵc)/ϵc0 - (ϵc/ϵc0)^2);
Nc1 = σc1*Ac;
Ns1 = Es*ϵs*As;
Nps1 = fpy*Ap;
Nto1 = (Nc1 + Nps1 + Ns1)*10^-3;
Nc2 = σc2*Ac;
Nps2 = fpy*Ap;
Ns2 = Es*ϵs*As;
Nto2 = (Nc2 + Nps2 + Ns2)*10^-3;
Nc3 = Ec*ϵc*Ac;
Nps3 = fpy*Ap;
Ns3 = Es*ϵs*As;
Nto3 = (Nc3 + Nps3 + Ns3)*10^-3;
Nc4 = fctk/(1 + (500*ϵc)^0.5)*Ac;
Nps4 = fpy*Ap;
Ns4 = Es*ϵs*As;
Nto4 = (Nc4 + Nps4 + Ns4)*10^-3;
Nc5 = fctk/(1 + (500*ϵc)^0.5)*Ac;
Nps5 = 1302*Ap;
Ns5 = fsy*As;
Nto5 = (Nc5 + Nps5 + Ns5)*10^-3;
a =
Piecewise[
{{Nto1, -0.0038 < ϵc <= -2.5*10^-3},
{Nto2, -2.5*10^-3 < ϵc <= 0},
{Nto3, 0 < ϵc <= 0.0000725},
{Nto4, 0.0000725 < ϵc <= 0.0021},
{Nto5, 0.0021 < ϵc <= 0.004}}]
Plot[a, {ϵc, -0.0038, 0.004}, Exclusions -> None]
If you will notice all the first 4 parts of the following plotted between -0.0038 to 0.0021 but the last one which is between 0.0021 to 0.004 is not coming in the plot.
Plot[ReIm[a], {\[Epsilon]c, -0.0038, 0.004},Exclusions->None]
and then think about why Complex might have something to do with part of your plot not showing up. $\endgroup$