Ejercicio matlab
Publicado por Moha (16 intervenciones) el 15/11/2018 17:13:54
Alguien me puede ayudar con los ejercicio 1 y 2
En el ejercicio 1 : X1=0,X2=3
Ejercicio 2 : X3=1,X4=8
Valora esta pregunta
0
clear all
X3=1; X4=8;
vk=-2:0.5:2
syms x
negativas=[ ];
for k=vk
p= (x^3+5*k*x^2+(2*k+(X3+3))*x+(20-X4));
coef=sym2poly(p);
raices=roots(coef);
u=raices<0;
negativas=[negativas; raices(u) ];
pause(0.3)
end
u=imag(negativas)==0;
vx= negativas(u)'
>> un_cuarto
vk =
-2.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 1.5000 2.0000
vx =
-1.0425 -1.1231 -1.2361 -1.4098 -1.7224 -2.4546 -4.2526 -6.7244 -9.2771
clear all
X3=1; X4=8;
vk=-2:0.5:2;
syms x
negativas=[ ];
for k=vk
p= (x^3+5*k*x^2+(2*k+(X3+3))*x+(20-X4));
coef=sym2poly(p);
raices=roots(coef);
u=raices<0;
negativas=[negativas; raices(u) ];
pause(0.3)
end
u=imag(negativas)==0;
vx= negativas(u)';
plot(vk,vx)
>> un_cuarto