Question: Problems 1, 2, and 3 require you to draw a flow chart. Your final draft of each flow chart should be drawn using Visio, Diagrams
Problems 1, 2, and 3 require you to draw a flow chart. Your final draft of each flow chart should be drawn using Visio, Diagrams Online, or something similar. Make sure your flow chart is drawn so it fits on one page. Save it as a pdf using the LastName-Lab#Pr# format and upload it to Canvas. 1. Create a flow chart to do the following, using MATLAB syntax in all blocks: Accept a value of a positive integer, n Calculate and then return the product of the odd integers from 1 to n (or from 1 to n-1 if n is even) Include error checking to display an error if the user inputs 0 or a negative number A machine cuts N pieces of a pipe. After each cut, each piece of the pipe is weighed and its length is measured. These two values are stored in a matrix called pipe where the first column is the length and the second column is the weight. Each row represents the weight and length of a cut piece of pipe. Ignoring units, the weight is supposed to be between 2.1 and 2.3, inclusive. The length is supposed to be between 10.3 and 10.4, inclusive. 2. Create a flow chart to do the following, using MATLAB syntax in all blocks: Count how many rejects there are. A reject is any piece that has an invalid weight and/or length. Return the number of rejects Return the percentage of the total number of parts that are rejects You can assume that your flow chart is a section of a larger flow chart that describes the entire cutting/measurement process. Therefore, it is not necessary to have a start block 3. In thermodynamics, the Carnot efficiency is the maximum possible efficiency of a heat engine operating between two reservoirs at different temperatures. The Carnot efficiency is given as =1 TH Where Tc and TH are the absolute temperatures at the hot and cold reservoirs, respectively. Write a flowchart that will prompt the user for the two reservoir temperatures in Kelvin and print the corresponding Carnot efficiency. The algorithm should error-check the user's input as absolute temperature cannot be S 0. The algorithm should also swap the temperature values if TH is less than Tc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
