Limit the values of the extreme elements of a vector.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ricardo Gutierrez
le 25 Avr 2018
Commenté : Ricardo Gutierrez
le 26 Avr 2018
Good Morning. I have this vector:
A=[ 0.0 0.66 1.37 2.17 3.13 3.81 4.54 5.44 6.04 6.66 ]
The elements that make up this vector will be changing progressively, that is, the previous number is smaller than the posterior one. The first element of this vector will always be 0.0 and the last vector element that does not exceed the value of 10.
I hope you help me.
Greetings and thanks.
3 commentaires
John D'Errico
le 25 Avr 2018
We have no clue as to what the question is. But Karnak predicts the answer is 42.
Réponse acceptée
Birdman
le 25 Avr 2018
Maybe this will help:
low=0;up=10;n=9;
A=[0 sort(low+(up-low)*rand(1,n))]
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!