Want to create a time vector
Show older comments
Hello guys,
i got stuck in this one. I want to create a time vector like -10 <= t < 10 ( because using <= then i have to include -10 in t and not include 10 in t.)
i did something like:
t = -10:0.01:10;
stp = @(t) double(t>=0);
Is my code right?
Answers (1)
t = -10:0.01:10-0.01 % 'colon'
t(end)
t = linspace(-10, 9.99, 2000) % 'linspace'
t(end)
.
Categories
Find more on Creating and Concatenating Matrices 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!