Answered step by step
Verified Expert Solution
Link Copied!

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 1: Name of employee
Column 2: Employee ID number
Column 3: Days they work
Column 4: Their hourly wage
info ={"Matthew",172,"MWF",22; "Melissa", 210,"TR",21;
"Sam", 341,"MRS",26; "Lisa", 244,"MTWRF",40}
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 172 should pop up.
If I type employees.Lisa.Days, I should see MTWRF in the Command
Window.
employees.Sam.Wage should be 26.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Crypto Asset Investing In The Age Of Autonomy

Authors: Jake Ryan

1st Edition

1119705363, 978-1119705369

More Books

Students also viewed these Finance questions