Matlab help with discrete time signal

1 view (last 30 days)
Joshua A
Joshua A on 4 Jul 2012
For discrete time signal...x(n)=ka^n{u(n)-u(n-5)}....x(n)=341...x(0)=10...signal has positive and negative values
Is there a way to determine constants 'k' and 'a' and plot x(n) within Matlab? Or is it necessary to find constants and plot x(n)? If so how? I have looked through help menus and can not find any way to make it work, but I am also new to Matlab.
Thank you,
Josh

Answers (1)

Rohan Kale
Rohan Kale on 5 Jul 2012
Edited: Rohan Kale on 5 Jul 2012
since your sequence is { ka,ka^2,ka^3,ka^4} which is {x(1) x(2) x(3) x(4) } and the sequence weights are known. hence your a= x(2)/x(1) and k=(x(1)^2)/x(2). for plotting just do stem(n,x); and if you want to plot the same with the expression ka^n just write this => n=-10:10; x=k*(a.^n).*[n>=0 & n<5]; you can change the range of 'n' per your requirement.

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!