Why is there no line on my plot ?
Show older comments
M=2.9; %Taylor Factor
alpha_1=0.2; %material constant.
alpha_2=2; %Lab Strengthening coefficient.
u=83*(10^3); %shear modulus.
rho=(1.6*(10^8)); %Dislocation Density.
Kc=190; %Carbon intersitual solute strengthening coeffiecent
Khp=6.16; %Hall Petch Co-efficient
Nhp=0.5; %Hall Petch exponent
Kmn=48; %solid solution strengthening component
a=2.48*(10^(-7));
b=(a/2)*((1+1+1))^0.5; %Magnitude of Burgers Vector BCC.
Tf=10^(-4)*u;
Tss=Kc*(0.0015)^0.5+Kmn*(0.0113)^0.5;
Ta=alpha_1*u*b*(rho)^.5;
Tlab=(alpha_2*u*b)/(0.5e-09);
Thp=(Khp/(1.0333e-6)^(Nhp));
TGB=(Tlab+Thp)/1e6;
Min_rad=50;
Max_rad=800;
steps=100;
prcp_rad=linspace(Min_rad,Max_rad,steps);
for i=1:length(prcp_rad)
p_rad=prcp_rad(i);
gamma=((4*pi/3*0.01)^1/3)*p_rad;
Tp(i)=(0.045*u*b/gamma)*log(p_rad/b);
LSTy(i)=Tp(i)+Tf+Tss+Ta+TGB;
LSyield(i)=M*LSTy(i);
Rmsb(i)=Tp(i)+Tf+Tss+TGB;
Rmsy(i)=sqrt((Ta^2)+Rmsb(i)^2);
Rmsyield=M*Rmsy(i);
end
plot(prcp_rad,LSyield(i));
Answers (1)
DGM
on 7 Nov 2021
Use the entire vector instead of the last element.
plot(prcp_rad,LSyield);
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!