for ii=1:n \n
if x(ii)<=a v=((-q*b*x(ii)^2)/(12*E*I))*(3*L+3*a-2*x(ii)); vi=((-q*b*x)/(2*E*I)).*(L+a-x); else v=((-q)/(24*E*I))*(x(ii)^4-4*L*x(ii)^3+6*L.^2*x(ii)^2-4*a.^3*x(ii)+a.^4); vi=((-q)/(6*E*I))*(x(ii)^3-3*L*x(ii)^2+3*L.^2*x(ii)-a.^3); endend
subplot(2,1,1); plot(x,v);
title(' ');
subplot(2,1,2); plot(x,vi);
Should there be a 'hold on' somewhere in the code? Thanks
Best Answer