Question

In: Computer Science

QUESTION 1 Answer the following questions about corrections in Population Models. Question: When you use the...

QUESTION 1 Answer the following questions about corrections in Population Models. Question: When you use the “floor(x)” command, you are doing what? (Select the BEST answer) rounding up dividing by a factor which determines the nutation of the answer truncating off the decimal/fractional portion of the number resetting the format command

a .rounding up

b .dividing by a factor which determines the nutation of the answer

c .truncating off the decimal/fractional portion of the number

d .resetting the format command

Question 2

Question:  In a Population Model problem which uses monthly time periods, the population at the end of a month is the same as the population before the start of the next month?

True or False

Question 3

Write a MATLAB code to find the number of values between 120 & 230 (inclusive) that are odd and multiples of either 11 or 13.

Store the answers as a single vector “m” with the first number you find meeting the criteria in location m(1), the second number in m(2), and so on. Then display the resulting “m” vector.

Use Matlab

3. A. enter the number of values that your code found between 120 & 230 that are odd and multiples of 11 or 13.

Solutions

Expert Solution

Question (1) Option C is the correct answer.

floor(x) function trucates the decimal portion of x , where as ceiling function ceil(x) rounds up x.

For example let x=3.43 . Then floor(x) = 3 , ceil(x) = 4.

Question (2)

Since you did not provide the population model on which you worked on, I can't decide if the statement provided is true or false. However if the the population of every month is calculated and stored seperately, then the answer is TRUE. If the population of every month is calculated and summed up with previous months data, then answer is FALSE. Please provide the population model, so that we can answer accurately.

Question (3)

Matlab code to code to display all odd numbers between 120 and 230 which are multiples of either 11 or 13 :

count=1;
m=zeros(1,100);
for i = 120:1:230
    if rem(i,2)~=0
        if rem(i,11)==0
            m(count)=i;
            count=count+1;
        elseif rem(i,13)==0 
            m(count)=i;
            count=count+1;
        else
            count=count+0;
        end
    end
end
g=sprintf('%d ',m(1:count-1));
fprintf('%s ',g);
fprintf('\n');
fprintf('The number of numbers that are odd and multiples or either 11 or 13 is : %d',count-1);

The above code checks for all the odd multiple of either 11 or 13 and stores the numbers in a vector m. After searching for all numbers in the range it prints the vector m .

The code also prints the number of numbers that satisfy the condition and the end.

Hope the answer helps you.

Thank you :)


Related Solutions

Use “PHXMayoData.xlsx” to answer the following questions: How about the optimized price when not considering the...
Use “PHXMayoData.xlsx” to answer the following questions: How about the optimized price when not considering the substitution between BF and KR compared to the result including the substitution effects (you can find the optimal prices with substitution effects in the video)? Give an intuitive explanation (you can write the answer to it in the Excel file). Hint: following the same steps but using the following models: Model1: Sales_BF = a + b1* Price_BF + Error Model2: Sales_KR = a +...
Think about the following questions : 1. First, answer Daniels question. Is there a right to...
Think about the following questions : 1. First, answer Daniels question. Is there a right to healthcare and, if so, what does it encompass? Think about it in terms of the limits to the right to healthcare. Should everything be covered? What should or shouldn't be covered by health ihsurance? Do we all have the same right to healthcare ? If not, why not? 2. Is healthcare rationing morally permissible? If so, under what circumstances? If not, what is the...
Answer the following questions with references and citations. 1. Explain, with the use of examples, when...
Answer the following questions with references and citations. 1. Explain, with the use of examples, when it would be appropriate to use trademarks and copyright to protect a firm’s intellectual property. Other than through the use of patents and copyright, how can a firm prevent its competencies from being imitated? 2. How can late entrants win the innovation race? Please give two examples. 3. Considering the case study, discuss some of the wider strategic reasons why firms may wish to...
QUESTION 7 Use the following information to answer the next two questions: (Question 1 of 2)...
QUESTION 7 Use the following information to answer the next two questions: (Question 1 of 2) Higgins Company purchased specialized equipment on July 1, 2019, that cost $300,000, has a residual value of $40,000, and a useful life of four years. The amount of depreciation expense for 2020, under the double declining balance method is: A. $112,500. B. None of the above C. $97,500. D. $75,000. E. $125,000. 2 points    QUESTION 7 B Use the following information to answer...
Use the following information to answer questions 1-3. A population of 1,000 students spends an average...
Use the following information to answer questions 1-3. A population of 1,000 students spends an average of $10.50 a day on dinner. The standard deviation of the expenditure is $3. A simple random sample of 64 students is taken. Determine the expected value of the sample mean. a. $3.00 b. $10.50 c. $5.25 Determine the standard deviation of the sample mean. a. 0.363 b. 3.000 c. 0.375 Determine the probability that these 64 students will spend a combined total of...
The following questions use the table below on soybean oil. Answer the following questions about an...
The following questions use the table below on soybean oil. Answer the following questions about an end user needing to purchase soybean oil. One soybean oil contract is 60,000 pounds (lbs). Now Later Cash Soybean Meal Market $0.335/lb $0.346/lb Futures Soybean Meal Market $0.3000/lb $0.311/lb 1) Is the individual concerned about price increasing or decreasing? 2) What is the initial action in the futures market: buy or sell? 3) What is the cash price paid/received by the individual later? 4)...
Question 1: Use the following information about the economy of Guyana in 2018 to answer the...
Question 1: Use the following information about the economy of Guyana in 2018 to answer the below question (NOTE - values are in Guyanese dollars): 2018 GDP - $689 billion 2018 Taxes - $117 billion 2018 Investment - $345 billion 2018 Government Spending - $144 billion 2018 Consumption - $454 billion What was the value of net capital inflow in 2018? (You can assume no transfer payments.) (Answers should be in the form "Z billion." Just enter "Z.") Question 2:...
Question 1: The following table to answer the following questions.
Question 1: The following table to answer the following questions.  a. Sketch the aggregate supply(s) and aggregate demand diagram(s). b. What is the equilibrium output and price level? c. If aggregate demand shifts right, what is long-run equilibrium output? d. If aggregate demand shifts left, what is equilibrium long-run output? e. For an economy at long-run equilibrium, would you suggest using aggregate demand to alter the level of output or to control any inflationary increases in the price level? Why?
Use the following data to answer questions: Total population = 300 million. Adult noninstitutionalized civilian population...
Use the following data to answer questions: Total population = 300 million. Adult noninstitutionalized civilian population = 200 million. Unemployed = 7.5 million If the labor force participation rate = 70%, what is the labor force
Question (1) Answer each of the following questions briefly. These questions are based on the following...
Question (1) Answer each of the following questions briefly. These questions are based on the following relational schema: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) (a) (5 points) Give an example of a foreign key constraint that involves the Dept relation. What are the options for enforcing this constraint when a user attempts to delete a Dept tuple? (b) (5 points) Write the SQL statements...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT