How to program a no periodic impulse train
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mauricio Galván García Luna
le 16 Août 2017
Réponse apportée : José-Luis
le 16 Août 2017
I have to write a program able to change the time interval of the impulse train. I mean... the first 10 seconds it has a x time interval then the next X, a random time, increasing or decreasing the time interval till it reaches the maximum time set at the beginning. Hope someone could help me.
6 commentaires
Réponse acceptée
José-Luis
le 16 Août 2017
intervals = [3,4,3];
hits = [1000,500,40];
result = cell(1,3);
cnt = 0;
beginning = 0;
for ii = [cumsum(intervals);hits]
cnt = cnt + 1;
result{cnt} = linspace(beginning,ii(1),ii(2)+1);
beginning = ii(1);
end
result = unique(cell2mat(result));
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Measurements and Feature Extraction dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!