Question: Need help making a MATLAB program for problem 2 please. Thanks! t have elapsed. Prompt the user to enter an array of amounts carbon 14

 Need help making a MATLAB program for problem 2 please. Thanks!t have elapsed. Prompt the user to enter an array of amounts

Need help making a MATLAB program for problem 2 please. Thanks!

t have elapsed. Prompt the user to enter an array of amounts carbon 14 present using the input function. Then prompt the user to enter an array of current amounts of carbon 14 present using another input function. Given the decay constant for carbon 14 0.00012097 per year, determine the amount of time that has elapsed for each pair of inputs. Assume both arrays are the same size and that the users enters larger values for the original amounts than for the current amounts and Problem 2: Someone has created the following code to display the frequency of subway trains in a terminal and the names of the train lines are A, B, C, Dand E. Rewrite the code using a switch structure (rather than the nested if), but do not change the prompt. You may assume the user enters an upper case letter at the prompt. (No if, iflelse, or iflelseif structures should be used) Line input ('Enter the line s') if Line 'A' & Line 'E' if Line disp ('This train arrives every 12 minutes. else disp ('This train arrives every 18 minutes. end else if Line 'A' disp ('This train arrives every 24 minutes. else if Line E disp 'This train is not in service. else

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!