Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Luggage delivery Assign deliveryCost with the cost (in dollars) to deliver a piece of baggage weighing baggageWeight. The baggage delivery service charges twenty dollars
Luggage delivery Assign deliveryCost with the cost (in dollars) to deliver a piece of baggage weighing baggageWeight. The baggage delivery service charges twenty dollars for the first 50 pounds and one dollar for each additional pound. The baggage delivery service calculates delivery charge by rounding to the next pound. Assume baggageWeight is always greater than 50 pounds. Ex: If baggageWeight is 65.4 pounds, then the weight is rounded to 66 pounds and deliveryCost is 20 + (16 * 1) = 36 dollars. Your Function E Save C Reset I MATLAB Documentation function deliveryCost = CalculateDelivery(baggageWeight) 2 % baggageWeight: Weight of baggage in pounds 3 % Assign deliveryCost with the delivery a piece of baggage weighing baggageWeight deliveryCost = 0; 7 end Code to call your function C Reset 1 CalculateDelivery(65.4) N m 4 no N
Step by Step Solution
★★★★★
3.46 Rating (140 Votes )
There are 3 Steps involved in it
Step: 1
Required solution i have coded ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Document Format ( 2 attachments)
635e3475e5d41_182338.pdf
180 KBs PDF File
635e3475e5d41_182338.docx
120 KBs Word File
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started