Question: Please answer using MATLAB CODING ONLY. Show all work and fill out the test table! D. (4 points) A movie theater sells 4 different priced

Please answer using MATLAB CODING ONLY. Show all work and fill out the test table!  Please answer using MATLAB CODING ONLY. Show all work and fill

D. (4 points) A movie theater sells 4 different priced tickets: youth, adult, senior, student. Below is a matlab function called "tickets" that has 2 vectors as arguments: the first vector has the price of each type of ticket in dollars and the second vector has the of each type of ticket sold for a group of customers. The function returns the total ticket income and the total number of tickets sold. function income cnt tickets price numTickets income price numTickets; income sum (income) cnt sum (num Tickets) end [total Income totalCount] tickets ([3 10 6 5 1 3 1 21) total Income 49 total count. a. The theater has decided to add a special discount. Customers get a percentage off equal to the number of people in their party. Add code to the above function for that modification. b. The theater is also trying a different special discount. If there are more than 5 customers of a type (youth, adult, senior, student), one customer of that type gets in free. Create a test table for each of these seperate modifications, and create two matlab functions to solve the problem. Design will be done in lecture or lab. Rpected Result verified? e Data Test Case (manually calculate)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!