Trying to produce a plot of X vs P, using a for loop
1 view (last 30 days)
I'm fairly new to this, and I am trying to find forces at a variety of different points from 0 to 750. I have a for loop set up to do this, but the code only produces one value for x, and a blank plot. Looking for any help to point me in the right direction, or let me know what I could be doing wrong. Thanks.
for x = 1:750
Anshika Chourasia on 24 Feb 2022
According to my understanding, in your code snippet x contains a singular value and you’re trying to plot a single point.
To plot a set of coordinates connected by line segments specify X and Y as vectors of the same length in the "plot(X, Y)" function. Please refer this link for more information related to 2-D line plot.