Hi, Im Mario from Argentina.
I want to make a graphic of a continuous function that change itselft
at certain place. Maybe someone know how to manage this case.
It's a current's graphic of a chage/discharge of a resistant-inductance
serial circuit.
The script file that I was making is that:
##Expresion de i_a en el tiempo
# Define eje x - de 0 a 5
t = linspace(0, 2, 500);
tiempo = 2;
figure, clf
#Funcion a graficar
#t(1:length(t)/2)
x1 = (24.-(24.*(e.^(-1.*(t(1:length(t)./2))))));
#t(length(t)/2:end)
#x2 =
(24.-(24.*(e.^(-1.*(t(250)))))).*(e.^(-1.*((t(length(t)./2+1:end)))));
#x2 = (a.*(e.^(-1.*((t(length(t)/2+1:end).-(t(1:length(t)/2)))))));
x2 = ((24.-(24.*(e.^(-1.)))).*(e.^(-1.*((t(length(t)/2+1:end))))));
#x2 =
((24.-(24.*(e.^(-1.)))).*(e.^(-1.*((t(length(t)/2+1:end).-(t(1:length(t)/2)))))));
#Ploteo
plot(t, [x1 x2], "b", "linewidth", 0.5)
size(t)
size(x1)
size(x2)
#plot(t, y(t), "b", "linewidth", 0.5);
#plot(t, ((24.-1)./1)*(1.-e.^(-t)), "b", "linewidth", 0.5);
#Grilla
grid on, hold on
#Titulo
title('Corriente de Armadura i_a', 'FontSize',20);
#Ejes
ylabel('i_a (A)','FontSize',16)
xlabel('t (seg)','FontSize',16)
## Imprime solido en eps
print "-S1680,1050" -solid -deps ia.eps;
Looking forward for an answer
Mario Trangoni
UTN FRC
Argentina
|