Question
MATLAB Question 2 Create a 4x5 matrix called SALES that contains these quarterly sales figures from the following States. Then answer the questions below. Note
MATLAB Question 2
Create a 4x5 matrix called SALES that contains these quarterly sales figures from the following States. Then answer the questions below. Note that in answering the questions, your code must access values from the matrix to find the results. After creating the initial matrix, do not hard-code any of these matrix values into your code.
a)Write one statement that calculates and shows the amount of money the company made in the first half of the year. Store that value in the variable A2.
b)Write one statement that calculates and shows the total amount of money that was made among all the states except Michigan in the second half of the year. Store that value in the variable in B2.
c)Write one statement that calculates and shows the total sales of the state that made the most money across all quarters. Store that value in C2.
d)Write one statement that calculates and shows the total sales of the state that made the least amount of money considering only the first three quarters of the year. Store that value in the variable D2.
e)Considering that each state spends $1000 + 15% of that states earnings on expenses, write one statement that calculates the companys total profits and store that value in the variable E2. The profits are the amount of money the company made after paying the expenses.
The Company Quarter 1 2 3 4 Michigan 52121 84005 48944 50035 Ohio 35148 81302 44541 58234 Indiana 25213 45815 74325 44531 lowa 41338 51097 53579 38944 Illinois 48012 35792 42501 10180Step 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