Hey all,
I need to discretize the states x (x(1) is position, x(2) is velocity) in a function called dicretize.
function s = discretize(x, par) if 0 < x(1) < 2*pi x(1) = x(1); else x(1) = mod(x(1), 2*pi); end s(1) = discretize(x(1), 1,par.pos_states)
Best Answer