Matlab plot is drawing an individual line to each data point
So im writing a matlab script that creates a 3 by 100 matrix x and a 1 by 100 matrix n. When I try to plot it, matlab draws an individual line segment from the origin to each data point, rather than just connecting the data points. From what I found online, it’s due to the plot function being inside a for loop, but after I moved it outside the loop it kept doing the same thing. Can somebody help.
Here’s what the plot looks likeSo im writing a matlab script that creates a 3 by 100 matrix x and a 1 by 100 matrix n. When I try to plot it, matlab draws an individual line segment from the origin to each data point, rather than just connecting the data points. From what I found online, it’s due to the plot function being inside a for loop, but after I moved it outside the loop it kept doing the same thing. Can somebody help.
Here’s what the plot looks like So im writing a matlab script that creates a 3 by 100 matrix x and a 1 by 100 matrix n. When I try to plot it, matlab draws an individual line segment from the origin to each data point, rather than just connecting the data points. From what I found online, it’s due to the plot function being inside a for loop, but after I moved it outside the loop it kept doing the same thing. Can somebody help.
Here’s what the plot looks like plotting, data points MATLAB Answers — New Questions