Thank you for your reply.
My program are as follows:
detaT=0.5; % interval of time
T=60; % total time
NNN=T/detaT; %number of intervals
Vmax=50; %the max velocity of UAV
Vmin=14; %the min velocity of UAV
When the program run to cvx_end, it shows the error. Actually, i used ‘expression’ instead of ‘variable’ to allow the coordinate and velocity be assigned. Then the program ran out without error but with a NaN or -Inf results.
In my question, i need obtain a optimal location and velocity. In my opinion, location and velocity can’t be declared as expression, they must be variables.
Hope you can answer my doubts.