How we plot the the below function in MATLAB ?

x₃[n]= (0.8)^n U[n] -10< n <10

2 comentarios

michio
michio el 2 de Sept. de 2016
I assume you want to plot x_3 as a function of n. What is U[n]?
Some function or a variable?
Is n an integer ranging from -10 to 10?
fplot from MATLAB base function could be of help. http://www.mathworks.com/help/matlab/ref/fplot.html
Muhammad Junaid
Muhammad Junaid el 2 de Sept. de 2016
U[n] is unit step function. Yes integer ranging from -10 to 10

Iniciar sesión para comentar.

 Respuesta aceptada

Star Strider
Star Strider el 2 de Sept. de 2016
See if this does what you want:
n = -19:20;
Un = [zeros(1,10) ones(1,20) zeros(1, 10)];
x3 = 0.8.^n .* Un;
figure(1)
stem(n, x3)
grid

2 comentarios

Muhammad Junaid
Muhammad Junaid el 3 de Sept. de 2016
Thank you so much its work...
Star Strider
Star Strider el 3 de Sept. de 2016
My pleasure.
If my Answer solved your problem, please Accept it.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 2 de Sept. de 2016

Comentada:

el 3 de Sept. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by