Function

Mario Trangoni mjtrangoni at gmail.com
Sat Jul 4 18:22:09 CDT 2009


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090704/674ed3ee/attachment.html 


More information about the Help-octave mailing list