Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: another symbolic expression problem
Replies: 0

 Spab Posts: 2 Registered: 12/11/04
another symbolic expression problem
Posted: Jul 19, 1996 1:03 AM

hi!

I have another problem with the symbolic expression.

I tried to plot f(t) = t[ u(t) - u(t-2)] (while u(t) is the
unit step response.
Here is the function define u(t)

-------------------------
function f = Heaviside(t)

%HEAVISIDE Unit Step function
% f = Heaviside(t) returns a vector f the same size as
% the input vector, where each element of f is 1 if the
% corresponding element of t is greater than or equal to
% zero.

f = (t>=0) ;
---------------------------
Here is the script I wrote for plotting f(t) = t[ u(t) - u(t-2)]

t = -1:0.2:3;
a = Heaviside([-1:0.2:3]);
b = Heaviside([-2:0.2:2]);
ft =sym('t*(a-b)');
ezplot(ft,t)

This is the error I got

??? Error using ==> ezplot
Symbolic variable not uniquely determined

Can anyone tell me what's wrong?

Mukaya