The data to be analyzed is provided in a text file called goldDataA.txt. The file contains the following columns of data in order, with no headers included in the file: Sample ID, Sample length (m), Sample radius (m), Sample Density (t/m3 ), the concentration of gold in the sample (g/t), the concentration of sulfur in the sample (Kg/t) and concentration of arsenic in the sample (Kg/t). The data is delimited with tab characters.
Using MATLAB, write a program that calculates the gold mass in each core sample, and orders them from highest mass to lowest mass. Additionally, the company has indicated a cutoff grade of 1 g/t (an area is not economically viable to develop if the grade is below this value), levels of sulfur below 5 (Kg/t) and levels of arsenic below 1 (Kg/t). Print the ordered grades, along with their corresponding ID numbers, and a Y or N indicating if the cutoff grade is met for that sample. Finally, print the maximum mass and its corresponding sample ID.
Your output should be formatted as follows:
ID, Gold Mass [g], Sulfur Mass [Kg], Arsenic Mass [Kg], Cutoff conditions? (Y/N)
3, 0.70, 1.06, 0.16, N
6, 0.53, 0.87, 0.17, Y
10, 0.27, 1.30, 0.36, N
7, 0.17, 0.56, 0.10, Y
1, 0.14, 0.60, 0.06, N
2, 0.09, 0.31, 0.04, Y
5, 0.09, 1.09, 0.19, N
8, 0.01, 0.70, 0.17, N
4, 0.00, 0.03, 0.01, N
9, 0.00, 0.01, 0.00, N
Max mass: 0.70 g at ID 3
File :
goldDataA
1 4.82 0.05 2.91 1.29 5.49 0.58
2 2.92 0.05 2.91 1.41 4.61 0.66
3 8.99 0.05 2.91 3.43 5.15 0.77
4 0.27 0.05 2.91 0.48 5.37 1.23
5 10.42 0.05 2.91 0.36 4.58 0.81
6 7.74 0.05 2.91 3.01 4.90 0.97
7 5.00 0.05 2.91 1.52 4.91 0.87
8 6.54 0.05 2.91 0.04 4.71 1.17
9 0.07 0.05 2.91 0.97 4.94 1.38
10 10.64 0.05 2.91 1.09 5.33 1.48
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme
Get Free Quote!
442 Experts Online