MATLAB: Have to use plot3

plot3

i have 3 coordinates x,y,z.. i have to plot it using plot3. my x,y,z coordinates gets updated in a for loop. i want all the points to get plotted in one plot using the default line style 'Solid line'. but ican't get it.i can only able to get using other line styles like 'o' , '.'.. Can anyone please help me with it???

Best Answer

You cannot plot with solid line style if you only plot one point at a time.
You should save your data in vectors and plot3() the entire vector after the loop.
If you need the line to update during the run for animation purposes, then have a look at animatedline()
Related Question