Errors in plotting Unit Step Function and Ramp Function !!!!
t = -10:0.1:10; % Unit Step Function
y(t>=0) = 1;
y(t<0) = 0;
t = -2 :0.001: 2; % Unit Impulse.......
y(t==0) = 1;
y(t~=0) = 0;
t = -2 : 0.001 : 2; %Ramp Function
y(t>=0) = t;
y(t<0) = 0;
For the Unit Step I am getting an error
??? Error using ==> plot
Vectors must be the same lengths.
For the Impulse func. if I change 't = -2 : 0.001 : 2 ' .... to something other like
t = -10 :0.1 :10....
Please help me removing those errors !!!!
For the Ramp....
??? In an assignment A(:) = B, th...Unit Step Function
I just received my 49G+ the 10 of January. I have used a 48SX/GX for
sometime. What I am trying find is how to program in the unit step function
into this calculator [an example would be: f(t)u(t), f(t-a)u(t), etc. from
the Laplace Transform Tables]. I will taking a Linear Signal and Systems
Class this Spring and I would like to use the Calculator help me verify my
answers both on Homework and on the tests. I have never tried to do this on
the calculator. I would appreciate any help with this. Thank-you.
Dennis E Ahner wrote:
> I just received my 49G+ the 10 of January. I have u...unit step function
I'm trying to graph the unit step function u(t), e.g., u(t) = 1 for t>0 and u(t) = 0 for t<0. I created a function (M-file),
function t = u(t);
but I keep getting a straight line in the form of y = x. I tried using,
I received an answer of [0 1 1 1 1 1 1 1 1 1 1]
on the command window, but I got aforementioned line.
Next, I tried replacing the output variable t with s, but that was worse. I received an error message saying I did not assign the output variable anything. No graph.
Any help appreciated.
Aaron Friedman wrote:
> ...Unit step functions
How do i represent these unctions in MATLAB 7:
I have been looking for a way to do it for about an hour and a half
now. This is what I have so far.
y_1 = t .* cos(10*pi*t) .* exp(-2*abs(t)) .* [u(t+2)-u(t-2)];
y_2 = sin(10*pi*t) .* [u(t+2)-u(t-2)];
I can't figure out how to input the Step Function. Any help would be
take a look for the laplace- and z-transform.
Additionally u(t+2) is an interesting term!
> I have been...unit step function
Can somebody help me on developing a code for unit step function?
Why did you create a new message? Please keep your questions to the <a href="http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=345259#M345259" target="_blank">original thread</a> where you already started receiving help. Message Edited by Ravens Fan on 08-04-2008 11:04 PM
...plotting unit step functions
Hi am trying to plot the unit step function u(t-1)-u(t-2)+u(2-t)-u(3-t)+u(t-3)-u(t-4) just not sure how to start it.
...How to create a unit step function??
I need to plot the following: x1(t)= tu(t)-tu(t-1)
this is what i've done so far to deal with the u(t-1) part:
(disregard the numbers here as i've yet to define my interval)
this gives me a column with the first five rows being 0 and the rest 1
i thought i could multiply this with t to get the desired effect, but understandably i get an 11x11 matrix and i can't really plot this vs time
"Miguel Bustelo" wrote in message <email@example.com>...
> I need to plot the following: x1(t)= tu(t)-tu...Unit Step Function #3
How do I plot a step function?
I'm supposed to plot:
x[n] = u[n] + u[-n]
from -20 to 20 and determine if it is a periodic function. I'm inclined to say it's not, as the function would always equal 1 and not oscillate. I'm not entirely sure though.
I realize this is probably very simple, but I don't have a programming bone in my body and don't retain this stuff very well.
"Ragan " <firstname.lastname@example.org> wrote in message <email@example.com>...
> How do I plot a step function?
> I'm supposed to plot:
> x[n...How to do step,impulse and ramp functions
I am having difficulty in understanding how to come about using the
info provided by help.
So if anybody could help ,e would be great.
I need to generate
IMPULSE function for:
I do not know the lines of codes to put in to do the above.
If someone could show me.