Hi, you are trying to plot a scalar value "x_root" against a time series which is why you are getting the error. Create an array
x_root = zeros(1, max_iter);
for i = 1:max_iter
Xi = x_est - ((w*(7*L^4 - 30*L^2*x_est^2 + 15*x_est^4))/(360*E*I*L))/(-(w*x_est*(L^2 - x_est^2))/(6*E*I*L));
if abs((Xi-x_est)/x_est) < tol
x_root(i) = Xi;
break
end
x_est=Xi;
end
and store values in that array. You would get zeros in the plot where this
if abs((Xi-x_est)/x_est) < tol
condition is not being met.