random add or subtract a number to an array
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Manikatam Gaddam
le 1 Avr 2019
Commenté : Manikatam Gaddam
le 2 Avr 2019
Hello All,
I am trying to randomly add or subtract a constant number to all array elments.
For suppose
a= [1 2 3 4]
b = a + either (0.5 only or -0.5 only)
Is there such possiblity in matlab?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!