No visible points for plot in for loop
问题 I'm struggling with a plot I want to make using a for-loop. I know it works when I add it after the loop (just a simple plot). But I want to try it in this other way. fib = ones(1:10); for k=3:10 hold on fib(k) = fib(k-1) + fib(k-2); plot(k,fib(k)) end hold off The output is a plot, but there are no points visible. 回答1: You need to specify a marker. The documentation says: If one of X or Y is a scalar and the other is either a scalar or a vector, then the plot function plots discrete points.