generate increasing exponential series for 10 numbers with sum equal 1.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
summyia qamar
am 10 Sep. 2018
Beantwortet: Guillaume
am 10 Sep. 2018
I want to generate 10 numbers in increasing manner such that their sum equals 1.. for example; .1+.1+.1+.2+.2+.3=1 in such a way I want 10 number which increase exponentially and sum equal 1... I tries geometric regression but it didnt work
2 Kommentare
Jan
am 10 Sep. 2018
0.1, 0.1, 0.1, 0.2, 0.2, 0.3 does not increase exponentially. So what do you exactly mean? You can choose any set of 10 numbers and divide them by their sum to get a total of 1.0. What is the problem then?
Akzeptierte Antwort
Guillaume
am 10 Sep. 2018
v = rand(1, 10);
v = sort(v) / sum(v)
If that's all you're after...
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!