Want to create a time vector
显示 更早的评论
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?
回答(1 个)
t = -10:0.01:10-0.01 % 'colon'
t(end)
t = linspace(-10, 9.99, 2000) % 'linspace'
t(end)
.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!