MATLAB PROBLEM You are given an array, weights, that contains the weights of some cargo items...

MATLAB PROBLEM

You are given an array, weights, that contains the weights of some cargo items in pounds. You want to load a truck with items from the list, up to its capacity. The truck has a maximum capacity of 1,000 pounds. For this problem use a "greedy" algorithm. That is, always load the heaviest item that will still fit on the truck. Keep loading until the remaining capcity of the truck is less than any of the remaining cargo items. For example, if the weights were {700, 400, 250, 100, 60}, you would load the 700-pound item, then the 250-pound item. The remaining items would be too heavy to fit on the truck. The weights will be generated randomly, so you cannot hard-code the answer - you must write a general algorithm to do it. Once the loading is complete, print a message indicating how many pounds of cargo were loaded onto the truck. NOTE: To satisfy the auto-grader, update the variable capacity so that it contains the remaining capacity of the truck. For example, if 943 pounds of cargo are loaded, capacity should be 57.

CODE PROVIDED BELOW

%The weights of the cargo items are generated at random

%They are sorted in descending order

weights = sort(randi(500, 1, randi(10)), 'descend')

capacity = 1000; %cargo capacity of the truck

In: Computer Science

Bank Dr 500 Capital, DB CR 500 Bank Dr 10,000 Bank loan payable Cr 10,000 Prepaid...

Bank Dr 500

Capital, DB CR 500


Bank Dr 10,000

Bank loan payable Cr 10,000


Prepaid rent Dr 6000

Gst paid on purchase Dr 300

Bank Cr 6,300


Miscellaneous expense Dr 125

Bank Cr 125


Prepaid insurance Dr 1500

Gst Paid on purchase Dr 75

Bank Cr 1575


Building supplies Dr 183.70

Gst Paid on purchase Cr 12.86

Accounts payable Walmart Cr 196.56


Furniture Dr 4500

Gst Paid on purchase Dr 315

Accounts payable sobeys 4815

Office supplies Dr 104.50

Gst Paid on purchase Dr. 7.32

Accounts payable Florida’s electrical business 111.82


Advertising expense Dr 300

Gst paid on purchase Dr 21

Accounts payable lazenza Cr 321


Advertising expense Dr 720

Gst paid on purchase Dr 50.40

Accounts payable Safeway Cr 770.40


Advertising expense Dr 680

Gst Paid on purchase 47.60

Accounts payable new York news paper Cr 727.60


Book keeper expense 400

Bank Cr 400

Bank Dr 1,875

Unearned revenue 1,875


Training expense Dr 250

Bank Cr 250


Bank Dr 2,875

Unearned revenue Cr 2875


Kitchen supplies Dr 200

Bank Dr 200


Accounts payable Walmart Dr 196.56

Bank Cr 196.56


Accounts payable sobeys Dr 4815

Bank Cr 4815


Bank Dr 7375

Unearned revenue Cr 7375


Accounts payable Flordias electrical business Dr 111.82

Bank Cr 111.82


Accounts payable lazenza Dr 321

Bank Cr 321


Accounts payable safeway Dr 770.40

Bank Cr 770.40


Bank Dr 15,750

Unearned revenue Cr 15,750


Miscellaneous supplies Dr 25.15

Bank Cr 25.15


n.r withdrawals Dr 250

Bank Cr 250


Supplies expense Dr 95.95

Bank Cr 95.95


Wages expense Dr 1,780

Deduction payable Cr 320

Bank Cr 1460


Supplies expense Dr 78.76

Bank Cr 78.76

Supplies Expense 85.95

Bank 85.95


Accounts payable Ra distribution 1632.50

Bank 1632.50


Accounts payable sobeys Dr 1749.25

Bank Cr 1749.25


Wages expense Dr 1780

Deduction payable Cr 320

Bank Cr 1460


Wages expense Dr1780

Deductions payable Cr 320

Bank Cr 1460


Unearned revenue Dr 625

Bank Cr 625


Wages expense Dr 1780

Deduction payable Cr 320

Bank Cr 1460


Depreciation expense Dr 375

Accumulated depreciation furniture Cr 375


Rent expense Dr 4000

Prepaid rent Cr 4000


Insurance expense Dr 1000

Pre paid insurance Cr 1000


Unearned revenue Dr 27,250

Revenue Cr 27,250

csn you help me with a trial balance please ?

In: Accounting

Calculate DrxnH

Calculate DrxnH

In: Chemistry

A local college newsletter reported that the average American college student spends one hour​ (60 minutes)...

A local college newsletter reported that the average American college student spends one hour​ (60 minutes) on a social media website daily. But you wonder if there is a difference between males and females. Attached below is a sample of 60 users of the website​ (30 males and 30​ females) and their recorded daily time spent on the website. Complete​ (a) and​ (b) below.

Daily_time_for_males Daily_time_for_females
150 45
930 75
30 30
30 45
10 15
5 120
720 90
300 180
60 210
180 10
180 100
180 60
270 60
270 90
210 150
45 75
90 60
270 60
40 270
150 120
20 30
45 30
60 60
150 150
60 60
15 15
45 120
20 20
120 90
100 35

a. Assuming that the variances in the population of times spent on the website per day are​ equal, is there evidence of a difference in the mean time spent on the website per day between males and​ females? (Use a 0.05 level of​ significance.)

Let m1 be the mean daily time spent on the website for male college students and m2 be the mean daily time spent on the website for female college students. Determine the hypotheses. Choose the correct answer below.

Determine the test statistic.

Find the​ p-value.

Choose the correct conclusion below.

b. In addition to equal​ variances, what other assumption is necessary in​ (a)?

A. In addition to equal​ variances, it must be assumed that the samples are specifically chosen and not independently sampled.

B. In addition to equal​ variances, it must be assumed that the sample means are equal.

C.In addition to equal​ variances, no other assumptions must be made because the sample sizes are large enough ​(greater than or equals≥30 for each​ sample).Your answer is correct.

D. In addition to equal​ variances, it must be assumed that the population sizes are equal.

In: Math

You are a professional robber planning to rob houses along a street. Each house has a...

You are a professional robber planning to rob houses along a street. Each house has

a certain amount of money stashed, the only constraint stopping you from robbing

each of them is that adjacent houses have security system connected and it will

automatically contact the police if two adjacent houses were broken into on the same night.

Given a list of non-negative integers representing the amount of money of each house,

determine the maximum amount of money you can rob tonight without alerting the

police.

In: Computer Science

What is the data rate of the following system:   The system sends sends a set of...

What is the data rate of the following system:  

The system sends sends a set of twp 7-bit ASCII characters as a block. The block is proceeded by 1 start bit. After the two character block there is 1 parity bit and 2 stop bits? The bit time for this system is 0.0000025 seconds per bit.

What is the data rate of the following system:  

In: Computer Science

what is combination of software and hardware responsible for taking user's request

what is combination of software and hardware responsible for taking user's request

In: Computer Science

15.The HIV virus that causes AIDS suppresses the immune response because Select one: a. it attacks...

15.The HIV virus that causes AIDS suppresses the immune response because

Select one:

a. it attacks memory B lymphocytes.

b. it causes opportunistic infections.

c. it attacks plasma cells.

d. it attacks memory T lymphocytes.

e. it attacks CD4+ T lymphocytes.

16.

Cells infected with a virus will display the antigens of the virus they are infected with via the MHC-I protein.

Select one:

True

False

In: Biology

Suppose inflation rate is 6% for the past year. The inflation rate is expected to be...

Suppose inflation rate is 6% for the past year. The inflation rate is expected to be 5% in the coming year and 4% per year thereafter. Assume that the real risk free rate r*, will remain at 2% over the next 10 years. The yield on a 5-year Treasury bond is 6.3% and the yield on a 10-year corporate bond is 8.4%. A 5-year corporate bond has the same maturity risk premium as the 5-year Treasury bond described. The 5-year corporate bond also has the same default risk premium and liquidity premium as the 10-year corporate bond described. Given that the maturity risk premium for the 10-year corporate bond is 0.3%, what is the yield on the 5-year corporate bond?

Ans : 8.3%

In: Finance

Part A A balloon is floating around outside your window. The temperature outside is 27 ∘C...

Part A

A balloon is floating around outside your window. The temperature outside is 27 ∘C , and the air pressure is 0.800 atm . Your neighbor, who released the balloon, tells you that he filled it with 3.50 moles of gas. What is the volume of gas inside this balloon?

Part B

A 12.0 L gas cylinder is filled with 7.60 moles of gas. The tank is stored at 31 ∘C . What is the pressure in the tank?

Part C

A 140. L kiln is used for vitrifying ceramics. It is currently operating at 1095 ∘C , and the pressure is 1.000 atm . How many moles of air molecules are within the confines of the kiln?

In: Chemistry

A series of object are being rotated. The same net torque is being applied to each...

A series of object are being rotated. The same net torque is being applied to each object. Rank the object in order of the resulting angular acceleration (1=lowest).

A solid disk spinning about its center. Total mass is M and a radius of 2R.
A hoop spinning about its center. Total mass is M and the radius is R.
An object consisting of two objects connected by a massless rod. Each object has a mass of 2M and is a distance R from the axis of rotation.
A solid disk spinning about its center. Total mass is M and a radius of R.

In: Physics

Medical Calculator Create a python program that allows the user to enter the following patient information:...

Medical Calculator

Create a python program that allows the user to enter the following patient information:

  • First name and Last name
  • gender
  • age
  • weight
  • height
  • systolic pressure and diastolic pressure
  • current body temperature in degrees Fahrenheit

Once the information is entered then the results should be printed on the display based on the information below:

  • BMI
  • Temp Conversion
  • Mean Blood Pressure
  • Weight Conversion (lbs to kg)
  • Height Conversion (inches to cm)

Output should be in the following format:

First Name Last Name is ___ cm and ___ kg's. First Name Last Name has a BMI of ___ , a temperature of ___ degrees Celsius, and his or her Mean Blood pressure is ___ mmHG. Mr or Ms Last Name is considered ____ (from the government BMI standards) and he or she has low/normal/high blood pressure.

Hint: all conversion formulas, BMI standards, and what is considered hi/normal/low BP's can be found online. The output should address the user by using Mr or Mrs and he or she.

In: Computer Science

Bluefield has decided to use an ABC costing system and has identified the following detailed information...

Bluefield has decided to use an ABC costing system and has identified the following detailed information about its cost pools and cost drivers: Activity cost pools Materials handling $56,000 Machine maintenance $17,640 Cost drivers Number of material moves 500 Number of machine hours 42,000 Required: 1. Calculate Bluefield’s activity rate for each cost pool. 2. Determine the amount of overhead assigned to Bluefield’s products if each has the following activity demands: Product A Product B Number of material moves 290 210 Number of machine hours 17,200 24,800

  • 1
  • Required 2

Calculate Bluefield’s activity rate for each cost pool. (Round your final answer for per material moves to nearest dollar amount and per machine hour to 4 decimal places.)

Activity Rate
Materials Handling per Material Move
Machine Maintenance per Machine Hour

Determine the amount of overhead assigned to Bluefield’s products if each has the following activity demands: (Round intermediate calculations to 4 decimal places and your final answers to 2 decimal places.)

Product A Product B
Number of material moves 290 210
Number of machine hours 17,200 24,800

Show less

Total Overhead Assigned
Product A
Product B

  

3.

Gable Company uses three activity cost pools. Each pool has a cost driver. Information for Gable Company follows:

Activity Cost Pools Total Cost of Pool Cost Driver Estimated Cost Driver
Machining $ 195,920 Number of machine hours 63,200
Designing costs 50,400 Number of design hours 6,000
Setup costs 69,776 Number of batches 490

Required:

1. Compute the activity rate for each activity.

2. Classify each activity as facility, product, batch, or unit level.

  • d 1
  • Required 2

Compute the activity rate for each activity. (Round your answers to 2 decimal places.)

Activity Activity Rate
Machining per Machine Hour
Design Costs per Design Hour
Setup per Batch

Classify each activity as facility, product, batch, or unit level.

Machining
Design
Setup

In: Accounting

Define the equivalence point of an acid-base titration. Describe it for a weak acid-strong base titration...

Define the equivalence point of an acid-base titration. Describe it for a weak acid-strong base titration (will the pH be >,<, or = 7).

In: Chemistry

What is meant by a ‘continuum of violence’ in feminist terms and what implications does this...

What is meant by a ‘continuum of violence’ in feminist terms and what implications does this have for the study of war?

In: Psychology