Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB The Human Resources department at a company is trying to organize information about their employees into a structure, but they have no idea how.
MATLAB
The Human Resources department at a company is trying to organize
information about their employees into a structure, but they have no idea how.
So they come to you for help!
They somehow converted their Excel information into a matrix cell array, where:
Column : Name of employee
Column : Employee ID number
Column : Days they work
Column : Their hourly wage
info MatthewMWF; "Melissa", TR;
"Sam", MRS; "Lisa", MTWRF
Copy and paste the line above to your own Editor Window to start this problem.
Note that this is a cell.
Create a structure called employees using a nested for loop that will have the names
of employees one layer down, followed by their information:
ID
Days
Wage
I recommend creating an additional string matrix of these categories
If you typed the following after finishing your code, you should get the expected
results.
If I type
employees.Matthew.ID the number should pop up
If I type employees.Lisa.Days, I should see MTWRF in the Command
Window.
employees.Sam.Wage should be
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