Julia contour lines issue

i am trying to sketch a contour lines plot by the code, but it shows “ERROR: UndefVarError: K not defined” can anyone help on how to define the K?

xvec = GradientDescent([1;1])
plot!(xvec[1,1:1:K], xvec[2,1:1:K], lw = 2, label = “iterates”)
ERROR: UndefVarError: K not defined
Stacktrace:
[1] top-level scope
@ REPL[6]:1

Please read the guidelines here and post a MWE.

3 Likes