Impose to a vector not to have zero elements
1 回表示 (過去 30 日間)
Hi everybody I need an help. Actually I've got a problem with my matlab code. The code is quite long and complex and deals with autonomous driving. I made a control system such that a leader vehicle tells to other vechicles behind to follow it. Now, i would like that, given an acceleration law, my vector that contains the speed does not become zero, or lower, in case of a high deceleration. How can I perform this?
that is how my speed vector, for each vehicle is filled up...But, regardless from this, how can I say to matlab "if speed <=0 then speed=0?