Guest
Hi all again,
To generate a typical impulse wave the code I wrote was this and could not get the required shape.
V=1;
T = 0:1e-7:tf;
i = 1;
for t = 0:1e-7:tf,
if t <= tr
X(i) = V * (1-exp(-t/tr));
else
if X(i) > (0.75*V)
X(i) = V * (exp(-t/(tf-tr)));
end
end
i = i + 1;
end
T = T';
X = X';
plot(T,X);
------------------------------------------------------------
What some people tell me is that there is a in-built fn to do the above, please let me know if there is any.
The people who told me r quite busy and r my seniors,so can't force them u know...
Thanks,
H
To generate a typical impulse wave the code I wrote was this and could not get the required shape.
V=1;
T = 0:1e-7:tf;
i = 1;
for t = 0:1e-7:tf,
if t <= tr
X(i) = V * (1-exp(-t/tr));
else
if X(i) > (0.75*V)
X(i) = V * (exp(-t/(tf-tr)));
end
end
i = i + 1;
end
T = T';
X = X';
plot(T,X);
------------------------------------------------------------
What some people tell me is that there is a in-built fn to do the above, please let me know if there is any.
The people who told me r quite busy and r my seniors,so can't force them u know...
Thanks,
H