Question: Question 2 ( 8 points ) Your friend has a huge jar of coins that they have been filling over the years, and your friend
Question points
Your friend has a huge jar of coins that they have been filling over the years, and your friend wants to count
their money. To avoid manually counting the coins, they deposited each coin into a jar through a lid that was
equipped with a device that measured the coins' diameter. Based on the diameter, the device assigned the coin a
number being the smallest and being the largest. That is corresponds to a dime, corresponds to a
penny, corresponds to a nickel, and corresponds to a quarter. The device recorded each coin this way, one
by one, and stored them each in the vector coins in HWCoinData. Your friend needs your extraordinary
MATLAB coding skills to find out exactly how much money they have in their jar.
Write a script that will analyze the data in the file by using logical indexing to determine how many of each
coin type there is storing those numbers in variables, and calculating the total amount of money in the jar.
Then it will print the results to the screen in the format shown below and save the four variables corresponding
to the number of each coin to a new file called HWResults.mat
The jar has ### quarters, ### dimes, ### nickels, and ### pennies.
The jar contains $#### in coins.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
