Equality == constraints

Why CVX dosen’t recieve q(1)==q(N) ? and when I replace q(1)==q(N) by sum_square(q(:,1)-q(:,N))<=1,CVX works?

Can I write v(n+1)=v(n)+a(n) directly ? q,v,a are all variables

I consult the CVX Users’ Guide :

The dimension of q is confusing, is it q(N) or q(:,N)? They are totally different. You can learn that in Matlab. And, you can write v(n+1)==v(n)+a(n); of course.

Thank you ! there are q(2,N) v(1,N) a(1,N),n=1:N.