Unit step function program

How to write a program code for u(n)-u(n-1) with explanation?

3 Comments

What does your question have to do with the unit step function? Give more details of what you are trying to do.
How to do this operation of u(n)-u(n-1) using matlab
Vanish - is this homework? What have you tried so far?

Sign in to comment.

Answers (1)

u = @(x) (2*x+4); % u = @(variable) (equation)
u(4)-u(4-1)

3 Comments

did this help you
I also need to show the graph of this!!
write a matlab program for u(n)+u(n-1) and verify how matlab reacts to it?

Sign in to comment.

Asked:

on 18 Mar 2020

Commented:

on 20 Mar 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!