Path Planning and Cost Functions

2 visualizaciones (últimos 30 días)
Ali Ali
Ali Ali el 26 de Feb. de 2019
Respondida: SandeepKumar R el 5 de Mzo. de 2019
want help of dividing a region in multi for particle moving from position to another. and the cost function are different from region to another like if in region 1 is (x+y) then in region 2 with be (x+y+4). so, what is the coding will be for this case?
plz, see attached for your reference.

Respuestas (1)

SandeepKumar R
SandeepKumar R el 5 de Mzo. de 2019
function [z]=f(r)
if r>0 & r<r1
z=x+y
elseif r>r2 & r>r1
z=x+y+4
end
Use conditional statements to get piecewise functions

Categorías

Más información sobre Particle Swarm en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by