Question: Please, solve in Python Suppose that the 100-vector x gives the age distribution of some population, with Xi the number of people of age i-1,
Suppose that the 100-vector x gives the age distribution of some population, with Xi the number of people of age i-1, for i=1,...,100. The total number of people with age between 5 and 18 (inclusive) is given by x6+x7+---+x18+x19. We can express this as s^Tx, where s is the vector with entries one for i=6,...,19 and zero otherwise. Generate a randomized x with entries between 0 and 100. HINT: rand(n) generates an n-vector with values between 0 and 1. how can you scale its entries to be between 0 and 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
