During this lab period, complete the following. Check out with one of the TAs showing your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
During this lab period, complete the following. Check out with one of the TAs showing your MATLAB workspace and m-file for the codes. Turn in a .pdf file or .txt file with your answers to the following questions, and your m-files for your code on Canvas. Look at the submission template on Canvas to better understand how your file should look. 1. Write a script that asks a user a set of questions and then determines and displays the car insurance premium for that person based on their answers to the questions. Car insurance premiums are calculated based on the following table: Premium formula Gender Age Male Under 21 1500+200*(number of speeding tickets) Male 21 to 29 1200+150*(number of speeding tickets) Male Over 29 1000+100*(number of speeding tickets) Female Under 21 1300+ 200*(number of speeding tickets) Female 21 & over 900+100*(number of speeding tickets) Deliverables (write these on your assignment when you turn it in): (a) Calculate your insurance premium. (b) Have one of the TAs use your program to calculate their insurance premium. Lab 3 MENG-210L 2. Piecewise functions are useful when the relationship between a dependent and an independent variable cannot be adequately represented by a single equation. For example, the velocity of a particular rocket can be described by: 2 v(t) = 10t - 5t 0 2 Pre-Lab Complete the following and turn in at the beginning of the lab period: 1. When should you use a switch statement vs. an if statement? 2. When is an elseif statement used? In the next lab, we will cover loop statements. However, in this lab we need to use for loop. A simple syntax for for loop is: 3. for index = values statements end = Use a for loop to write a pseudocode to display all values of vector V [9, 3, 5, 1, 7] separate lines. (hint: index all existing positions in vector V) 4. 5. Write pseudocode and a flowchart for Problem 1 in the lab assignment. Write pseudocode and a flowchart for Problem 2 in the lab assignment. During this lab period, complete the following. Check out with one of the TAs showing your MATLAB workspace and m-file for the codes. Turn in a .pdf file or .txt file with your answers to the following questions, and your m-files for your code on Canvas. Look at the submission template on Canvas to better understand how your file should look. 1. Write a script that asks a user a set of questions and then determines and displays the car insurance premium for that person based on their answers to the questions. Car insurance premiums are calculated based on the following table: Premium formula Gender Age Male Under 21 1500+200*(number of speeding tickets) Male 21 to 29 1200+150*(number of speeding tickets) Male Over 29 1000+100*(number of speeding tickets) Female Under 21 1300+ 200*(number of speeding tickets) Female 21 & over 900+100*(number of speeding tickets) Deliverables (write these on your assignment when you turn it in): (a) Calculate your insurance premium. (b) Have one of the TAs use your program to calculate their insurance premium. Lab 3 MENG-210L 2. Piecewise functions are useful when the relationship between a dependent and an independent variable cannot be adequately represented by a single equation. For example, the velocity of a particular rocket can be described by: 2 v(t) = 10t - 5t 0 2 Pre-Lab Complete the following and turn in at the beginning of the lab period: 1. When should you use a switch statement vs. an if statement? 2. When is an elseif statement used? In the next lab, we will cover loop statements. However, in this lab we need to use for loop. A simple syntax for for loop is: 3. for index = values statements end = Use a for loop to write a pseudocode to display all values of vector V [9, 3, 5, 1, 7] separate lines. (hint: index all existing positions in vector V) 4. 5. Write pseudocode and a flowchart for Problem 1 in the lab assignment. Write pseudocode and a flowchart for Problem 2 in the lab assignment.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these mechanical engineering questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
This assignment requires you to complete the 2022 tax reporting for a fictional woman named Anna Smith. Question 1 T1 - step 4 - line 66 This is Anna's taxable income Answer: Question 2 T1 - step...
-
XYZ Corporation is considering two mutually exclusive projects that require a $150,000 investment each. Project A has an expected life of 6 years and will generate net cash flows of $35,000 per year....
-
Intramitochondrial ATP concentrations are about 5 mM, and phosphate concentration is about 10 mM. If ADP is five times more abundant than AMP, calculate the molar concentrations of ADP and AMP at an...
-
There are so many changes taking place in the macroenvironment that it is impossible for an organization to keep track of them all. Make three suggestions regarding how organizations might manage...
-
Figure \(\mathrm{P} 27. 33\) shows the arrangement we looked at in Example 27. 2: a metal bar \(0.20 \mathrm{~m}\) long suspended from two springs, cach having a spring constant \(k=0.10 \mathrm{~N}...
-
Fong Corporation sold $2,000,000, 7%, 5-year bonds on January 1, 2017. The bonds were dated January 1, 2017, and pay interest on January 1. Fong Corporation uses the straight-line method to amortize...
-
The definition, " ' Chiropractor ' means a person who is a medical quack with no legitimate scientific background," is an example of: Theoretical definition Definition by subclass Persuasive...
-
Bob and Susan Menzel are planning to open a food service operation and have heard about operating leverage. They are forecasting annual sales and depreciation expenses as follows: Annual sales Food...
-
Consider a homogeneous Markov chain X. t= 0,1,2,..., with four states S= (0,1,2,3), and transition probability matrix 1720 12001 1200 a. Draw the state transition diagram. b. Which states are...
-
A skateboarder starts up a 1.2-mm-high, 32 ramp at a speed of 6.6 m/s. The skateboard wheels roll without friction. At the top, she leaves the ramp and sails through the air. How far from the end of...
-
The manager at IT Consulting provides IT support to several clients. The manager concerns about a significant client under Service Level Agreement (SLA). Under this SLA, all tier-one issues must be...
-
Financial Management A . The management of Rowlock Inc. is considering cash variability in its planning based on the following assumptions. The standard deviation () of the daily cash balance during...
-
Project procurement management is a Knowledge Area that involves selecting sellers (vendors), negotiating their terms, and managing the ongoing relationships with them. Sometimes those activities are...
-
A project manager is approached by an organization to develop the resource planning for their new innovative project. Even though the project manager has worked with many similar organizations in the...
-
Business managers are confronted on a daily basis with decisions regarding the use of real, personal, and intellectual property, and the rights and duties existing with relation to these property...
-
As you rewrite these sentences, replace the cliches and buzzwords with plain language (if you don't recognize any of these terms, you can find definitions online): a. Being a jack-of-all-trades, Dave...
-
Using a search engine such as Google, search for power of a hypothesis test. Describe what the power of a hypothesis test is.
-
What do p, p, and P-value represent?
-
H 0 : The lottery is fair. Ha: The lottery is biased. Without using the terms null hypothesis and alternative hypothesis, identify the type I error and identify the type II error.
Study smarter with the SolutionInn App