I don’t have your constants so I can’t reproduce your exact results. This idea does what you want:
w = 3;
lc = 5;
lp = 11;
distance = [0:1:7];
for x=1:length(distance)-1
Tension(x)= (w*lc*lp)/(x*sqrt((lp^2)-(x^2)));
end
distanceP = [zeros(1,length(distance)-1); distance(2:end)];
TensionP = [Tension; zeros(size(Tension))];
plot(distanceP,TensionP,'-o')
title('Distance vs. Tension');
xlabel('Distance, (m)');
ylabel('Tension, (N)');
grid on;
The ‘distanceP’ and ‘TensionP’ are plot matrices that create the correct x and y coordinates to plot. Their construction is relatively straightforward. Take a look at their structures to understand how they work, specifically how they plot each (x,y) pair. Note that it plots each column of each matrix against the corresponding column of the other, taking advantage of MATLAB using column-major addressing.