4. Write a MATLAB scrip named example4 a. Consider that a cellphone is build fro
ID: 3168245 • Letter: 4
Question
4. Write a MATLAB scrip named example4 a. Consider that a cellphone is build from 3 elements (display, board and case b. There are 3 suppliers for the display and the costs for each supplier are given in the following matrix disp 98 75 e. There are 5 suppliers for the board with the following costs 450 Roards$600 480 d. The are 4 suppliers for the cases with the following costs $90 cases|$110 120 $85 e. Write a vector called phone of size 1x3(1 row 3 columns) 1. 2. 3. The first elements is a random number from 2 to3 The second element is a random number from 1 to 5 The third element is a random number form 1 to 4 For instance one possible outcome could be: Phone [2,5,4] f. phone vector represents the elements used to build the phone for Consider the instance a vector phone [2,5,4] means a phone is build from a display from supplier 2, a board from supplier 5 and it uses a case from supplier 4 Calculate the total cost of the generated phone vector. For instance the total cost ef the vector phone [2,5,Al should be $98 (display) $570 (board) $85 (case). TC-753 S. Consider the problem solved in class using the simplex method Minimize Z = x1 + 2x2-4x) - + 2x2 + 2x3 2 oforall 4 Write a MATLAB script (example5) that performs the first he first iteration Hint to build the new tableau for each column multiply the coefficient of A of the variables in the basis times the original coefficient of A of the desire column of the tableau a.Explanation / Answer
4:
disp_ = [100,98,75];
boards = [500,450,600,480,570];
cases = [90,110,120,85];
phone = [randi(3),randi(5),randi(4)];
total_cost = disp_(phone(1)) + boards(phone(2)) + cases(phone(3));
sprintf("Phone: [%d %d %d]", phone)
sprintf("Total cost: %d", total_cost)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.