as the error says, you brackets is not in pairs.
change
while(norm(g_k)/(max(1,norm(v_k)) > eps && iter < iterMax)
to
while(norm(g_k)/max(1,norm(v_k)) > eps && iter < iterMax)
solved Matlab While statement [closed]
as the error says, you brackets is not in pairs.
change
while(norm(g_k)/(max(1,norm(v_k)) > eps && iter < iterMax)
to
while(norm(g_k)/max(1,norm(v_k)) > eps && iter < iterMax)
solved Matlab While statement [closed]