Código
void control(double te[], double ts[]) { double signo1,signo2,z1,zp1,z4,zp4,e1prima,e4prima,e1,e4; char letra; if (letra == 'c'){ if ((0.6*ts[0]-8*ts[1]+1.5*ts[2]+1.5*ts[3]-0.6*ts[4])>0){ signo1=1; } else{ signo1=-1; } if (signo1 == 1 && signo2== -1) { zp1=z1; te[0]=z1-ts[0]; zp4=z4; te[1]=z4-ts[3]; } if ((0.6*ts[0]-8*ts[1]+1.5*ts[2]+1.5*ts[3]-0.6*ts[4])>0){ signo2=1; } else { signo2=-1; } e1prima=-1225*e1; e1=e1+e1prima*0.02; //vTm(0,02) e4prima=-1225*e4; e4=e4+e4prima*0.02; te[0]= 1225*e1; te[1]= 1225*e4; } }
· Los códigos deben ir en etiquetas GeSHi
>aquí las reglas del foro
-Engel Lex