function y = bdot(u) % This block supports an embeddable subset of the MATLAB language. % See the help menu for details. persistent h; persistent cont; persistent u_old; k = 0'; if isempty(h) h = 0; cont = 0; u_old = 0; end %u = u; switch h case 0 cont = 0.049*(u(1:3)-u_old(1:3)+cont(1:3)*0.0759); u_old = u; k(1:3) = cont; h = h+1; case 9 h = 0; otherwise k(1:3) = cont; h = h +1; end y = k;