Create a unitary step entrance with n points
2 views (last 30 days)
Show older comments
How can i create a vector 1*200 with ones in the first 100 numbers and zeros in the rest. I wanna study the outpout response of a system to this entrance. x(n)=u(n)-u(n-1) with n=200 ssamples.
0 Comments
Accepted Answer
Guillaume
on 20 Sep 2014
You just concatenate your vector of 100 ones with your vector of 100 zeros:
v = [ones(1, 100) zeros(1, 100)];
0 Comments
More Answers (0)
See Also
Categories
Find more on NaNs 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!