t1 range is 0.1 to 2 and t2 range is 0.1 to 2.....and t1+t2 should not be greater than 2
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
t1 range is 0.1 to 2 and t2 range is 0.1 to 2.....and t1+t2 should not be greater than 2
4 commentaires
Réponse acceptée
Birdman
le 10 Avr 2018
t1=0:0.1:2;
t2=0:0.1:2;
t=t1+t2;
t(t>2)=[];
Plus de réponses (1)
Torsten
le 10 Avr 2018
Generate a pair of random numbers in the range [0.1:2].
Accept the pair if their sum is less or equal 2.
Repeat until you have generated enough feasible pairs.
Best wishes
Torsten.
0 commentaires
Voir également
Catégories
En savoir plus sur Sources 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!