 function [xp] = dinamica(z)

 n=4;
 m=2;
 for I = 1:n,
     x(I) = z(I);
 end
 for I = (n+1):(n+m),
     u(I-n) = z(I);
 end
 
 xp(1) = x(2);
 xp(2) =  -x(1) - x(2)-(x(1))^3 -(x(2))^3 + u(1);
 xp(3) = x(4);
 xp(4) =  -x(3) - x(4)-(x(3))^3 -(x(4))^3 + u(2);
 
 