## Plotting graph using for loop in MATLAB

Why this happens… With plot(x(i),y) you are plotting 100 single points (one in each iteration) and they are not shown by default. Therefore the plot looks empty. Solution 1: Vectorized calculation and direct plot I assume you meant to draw a continuous line. In that case no for-loop is needed because you can calculate and … Read more