Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Pls need help with this problem DO THE PROGRAM IN MAT LAB MATHLAB & DO WHAT IS ONLY TELLING YOU TO DO pls RESOLVE WITH
Pls need help with this problem DO THE PROGRAM IN MAT LAB MATHLAB & DO WHAT IS ONLY TELLING YOU TO DO pls
105210101010152551085105101102210652 \begin{tabular}{|c|c|c|c|c|c|} \hline & Peanuts(oz) & Almonds(Oz) & Walnuts(oz) & Raisins(oz) & M&Ms(Oz) \\ \hline Mix 1 & 10 & 10 & 5 & 5 & 2 \\ \hline Mix 2 & 5 & 10 & 10 & 10 & 10 \\ \hline \hline Mix 3 & 2 & 15 & 8 & 1 & 6 \\ \hline Mix 4 & 10 & 2 & 5 & 10 & 5 \\ \hline Mix 5 & 10 & 5 & 10 & 2 & 2 \\ \hline \end{tabular} RESOLVE WITH WHILE and MATRICES
A food company manufactures five types of 32-oz trail mix packages using different mixtures of peanuts. almonds, walnuts, caisins and M&Ms. The mixtures can vary in the amount of each composition (with some min and max for cachi but can never vary in the total weight of the package.
The data of each package manufactured is stored by day
Your program must verify that each package complies with the min, max and total weight requirements as follows:
Each package mast have la total weight of 32-oz. if the package have less or more than that, the program must say that it dida't pass the test and why (too light, too heavy)
Each package must have at least 2 of each ingredient, and 10 as most. If a package have less or more than that, the program must say that it didn"t pass the test and why (which ingredients are not right and if t has too few of it or too much)
write a script that solves this problem with the established conditions, the input must be a matrix v from there select the required information example
If input is matrix
Means that:
According to the requisites, Mixes#2, 3 and 5 should be rejected, so, the message should be:
Total Rejetions=3
Rejection: Mix 2 - total weight beavier than standard.
Rejection: Mix 3 - Almonds execed standard, Raisins are below standards
Rejection Mix 5-total weight lighter than standards
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started