« Return to Thread: Function

Re: Function

by Mario Trangoni :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
The only one thing about Im not sure.. is to obtain the value of the function at one place. Because I dont need the complete charge graphic.

How can I make that?

Thank you

Mario

dastew@... schrieb:



Date: Sat, 4 Jul 2009 20:22:09 -0300
From: mjtrangoni@...
To: help-octave@...
Subject: Function

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




Is this what you were thinking?

t1=0:.2:10;
t2=0:.2:10;
t3=0:.2:20.2;
x1=24*(1-e.^(-t1));
x2=24*e.^(-t2);

x=[x1 x2];

plot(t3,x)



Doug



_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

 « Return to Thread: Function