Want to create a time vector
1 view (last 30 days)
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?
0 Comments
Answers (1)
Star Strider
on 2 Oct 2022
t = -10:0.01:10-0.01 % 'colon'
t(end)
t = linspace(-10, 9.99, 2000) % 'linspace'
t(end)
.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!