attach y2 to y1

feldmaus feldmann_markus at gmx.de
Tue Jun 9 04:32:18 CDT 2009


feldmaus <feldmann_markus <at> gmx.de> writes:

> 
> Hi All,
> 
> i want to attach the result of the discharge function u2 to the result of a
> charge function u1 , so how to do that?
> 
Ok i got  it,
%Konstanten
T1=1e-6;
T2=2e-6;
t1=0:0.1e-6:5e-6;
t2=0:0.1e-6:10e-6;
t=[t1,t2+max(t1)];
U0=1;
%Aufladung
u1=U0*(1-exp(-t1/T1));
%Entladung
u2=U0*exp(-t2/T2);
u=[u1,u2];
plot(t,u)

regards Markus



More information about the Help-octave mailing list