generate increasing exponential series for 10 numbers with sum equal 1.

조회 수: 1 (최근 30일)
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
Jan
Jan 2018년 9월 10일
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?
summyia qamar
summyia qamar 2018년 9월 10일
I mean in this way gradually increaseing..I tried but couldnt figured out..can you give an example?

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2018년 9월 10일
v = rand(1, 10);
v = sort(v) / sum(v)
would be one way to generate a monotonically increasing vector of 10 numbers.
If that's all you're after...

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by