Want to create a time vector
Afficher commentaires plus anciens
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?
Réponses (1)
t = -10:0.01:10-0.01 % 'colon'
t(end)
t = linspace(-10, 9.99, 2000) % 'linspace'
t(end)
.
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!