subject
Business, 18.02.2020 17:35 shylabear6536

Write a script to populate an array, called data_array, with 10 random values. Although you can do this with rand() directly, for this exercise create the array with the zeros() function and then use a loop using for, length(), and rand(), to assign values to the array elements. Compute the sum of the values in data_array, instead of using the sum() function. To do this, you must "accumulate" a result, which means that you first create a variable, called data_array_sum, to hold the accumulating result and initialize it to 0. Then loop through your array, updating the accumulating data_array_sum by adding each data_array value as you go: data_array_sum = data_array_sum + data_array(i); Finally, divide the data_array_sum value by the length of data_array, using the length() function and output the result along with the result of calling mean() on data_array, to show that they are the same.

ansver
Answers: 2

Another question on Business

question
Business, 21.06.2019 17:50
When borrowers want funding to pay for different projects, they go to the loanable funds market and acquire funds through either indirect finance or direct finance. below, you are given five different scenarios. is each an example of direct finance or indirect finance?
Answers: 2
question
Business, 22.06.2019 06:00
Select the correct answer a research organization conducts certain chemical tests on samples. they have data available on the standard results. some of the samples give results outside the boundary of the standard results. which data mining method follows a similar approach? o a. data cleansing ob. network intrusion o c. fraud detection od. customer classification o e. deviation detection
Answers: 1
question
Business, 22.06.2019 10:10
Karen is working on classifying all her company’s products in terms of whether they have strong or weak market share and whether this share is in a slow or growing market. what type of strategic framework is she using?
Answers: 2
question
Business, 22.06.2019 11:10
Your team has identified the risks on the project and determined their risk score. the team is in the midst of determining what strategies to put in place should the risks occur. after some discussion, the team members have determined that the risk of losing their network administrator is a risk they'll just deal with if and when it occurs. although they think it's a possibility and the impact would be significant, they've decided to simply deal with it after the fact. which of the following is true regarding this question? a. this is a positive response strategy.b. this is a negative response strategy.c. this is a response strategy for either positive or negative risk known as contingency planning.d. this is a response strategy for either positive or negative risks known as passive acceptance.
Answers: 2
You know the right answer?
Write a script to populate an array, called data_array, with 10 random values. Although you can do t...
Questions
question
Mathematics, 08.12.2020 09:10
question
Mathematics, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
Chemistry, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
English, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
question
Mathematics, 08.12.2020 09:20
Questions on the website: 13722360