Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB using for loops and if else if statements Data: You may load the data into MATLAB with the command load toxic.csv. The data will

MATLAB using for loops and if else if statements

Data: You may load the data into MATLAB with the command load toxic.csv. The data will then be in an array called toxic. The column information represents:

Column 1: Year AD

Column 2: Cadmium (nanograms per gram)

Column 3: Lead (nanograms per gram)

Column 4: Thallium (nanograms per gram)

Section 2: Repetition Structures and Conditional Blocks

Allowed Syntax:

Complete the following (1) WITH the use of for loops and conditional blocks [i.e. if-elseifelse-end]; (2) you may NOT use any syntax requiring the dot operator; (3) you may use relational operators on scalars but you may NOT use them on arrays. (Relational operators include: <, >, <=, >=, ==, ~=) (4) You may reuse the years that were found using the find function in Section1

1. How many years during the period of this data set have a lead concentration greater than 0.2 ng/g?

2. For what percentage of the years during the 1800s (1800-1899) is the lead concentration greater than 0.01 ng/g?

3. What is the most recent year during which lead is greater than 100 times the concentration of cadmium? What is the concentration of Pb that year?

4. For which year during the 1900s (1900-1999) did cadmium contribute its largest fraction to the total heavy metal concentration (i.e., year with largest Cd/(Pb+Cd+Th))? What is that value? (hint: help max)

5. [Up to 2pt bonus] During which decades (i.e, 1900-1909, 1910-1919, etc.) of the 1900s did lead concentration exceed 0.3 (ng/g)?

I need help with problems 1-4 if you could provide the solution in MATLAB script file that would be helpful thanks.

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions