Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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. elseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started