Question

In: Mechanical Engineering

General Instructions Upload Matlab files for Assignment 8 to the appropriate link on Blackboard. Upload final...

General Instructions Upload Matlab files for Assignment 8 to the appropriate link on Blackboard. Upload final Matlab files (YourINITIALSfilename.m), separately. Print program flowcharts, listings (a copy of the Matlab code) and requested sample runs, and submit each on the due date. Deliverables: For each program submit a flowchart, listing of the code, a sample run and the program’s Matlab (.m) file.

Problems: 1. The “filename” in YourINITIALSfilename.m for this program is “cylinder”. Create a flowchart and a corresponding Matlab program that outputs a hollow cylinder’s inner diameter, surface area and volume when a user enters cylinder height (h), outer diameter (d) and inner diameter as a percentage (p) of outer diameter. This program must prompt the user to accept any reasonable value for height, outer diameter and percentage (0-100%). In the submitted file after the listing for the final program, provide the results for one sample run of the program with h = 1 in, d = 2 in and p = 50%.

Solutions

Expert Solution

FlOWCHART:

1. Prompt user for input of required values, viz h,d & p

2. Calculate id , surface area, volume from given values

3. Print the output as calculated values.

clear;
clc
%Input
h=input('Enter the value for height of cylinder \n');
d=input('Enter the outer diameter \n');
p=input('Enter inner diameter as % of outer diameter \n');

%Caluculations
id=p*d/100;
%Surface area = outer surface + inner surface + annular area
%You can change the formula according to your requirement of surface area
sa=2*(pi*(d^2-id^2)/4)+(pi*d*h)+(pi*id*h);
vol=(pi*(d^2-id^2)/4)*h;
%output
fprintf('Inner diameter is %0.2f \n',id);
fprintf('Surface area is %0.2f \n',sa)
fprintf('Volume is %0.2f \n',vol);


Related Solutions

Instructions: Complete the following case study and upload it to the assignment section prior to the...
Instructions: Complete the following case study and upload it to the assignment section prior to the due date. This will contribute towards the case study portion of a student’s grade. Case study answers must be typed. Point values are assigned per question. Patient Profile M.W. is a 65-year-old female. She is a retired auto worker who lives in a condo with her golden retriever, Charlie. She has a history of diabetes type II diagnosed 3 years ago. She had a...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only)...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted through email will not be accepted. Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the cover page. Students must mention question number clearly in their answer. Late submission will NOT be accepted. Avoid plagiarism, the work should be in your own words, copying...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only)...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted through email will not be accepted. Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the cover page. Students must mention question number clearly in their answer. Late submission will NOT be accepted. Avoid plagiarism, the work should be in your own words, copying...
Style Interview for a Company's Newsletter Instructions Assignment Files Grading Resources: The Art and Science of...
Style Interview for a Company's Newsletter Instructions Assignment Files Grading Resources: The Art and Science of Leadership, Ch. 4 & Ch. 6 and Leadership Newsletter Template Mat Lead Leade Select someone in a leadership postion at your organization or at a local company where you might seek employment. This individual could be a director, manager, supervisor, or CEO of the organization. News The A The Ar Write a 1,050- to 1,400-word profile of the individual that you interviewed for your...
This assignment uses a combination of classes and arrays. Instructions: 1) download the 3 program files...
This assignment uses a combination of classes and arrays. Instructions: 1) download the 3 program files into a new C++ project.    NOTE: if your IDE does not allow you to create projects - or you are not sure how to do it - then you may combine the two cpp files into a single file. 2) Complete the program by adding code the the class methods. You may want to study the existing code first to get a feel...
Final Project Elementary Statistics Directions: Please follow each step below. Upload your completed assignment as a...
Final Project Elementary Statistics Directions: Please follow each step below. Upload your completed assignment as a Word document in Canvas. Step 1: Choose one research question from the list below: 1. Does viewing a movie versus reading a book about the movie allow students to score higher on assessments related to the literature? 2. Does drinking caffeine affect students' performance on tests? 3. What is more important to college-bound high school seniors when choosing a major: interest in the subject,...
*In JAVA and JavaFX please!! CSE1322 – Assignment 8 – GUI General User Interface Assignment 8...
*In JAVA and JavaFX please!! CSE1322 – Assignment 8 – GUI General User Interface Assignment 8 Objectives • Build a GUI application similar to a calculator. • Create an application that acts as a simple calculator. Create buttons for 0-9 and a text field that displays the concatenation of the current digits as they are clicked. • Add buttons for operators “+”, “-“, “*”, and “/”. • Add a final button for “=” that calculates the computed value with the...
Week 8 Assignment 4 Submission If you are using the Blackboard Mobile Learn iOS App, please...
Week 8 Assignment 4 Submission If you are using the Blackboard Mobile Learn iOS App, please click "View in Browser”. Click the link above to submit your assignment. Students, please view the "Submit a Clickable Rubric Assignment" in the Student Center. Instructors, training on how to grade is within the Instructor Center. Assignment 4: Win the Contract Due Week 8 and worth 120 points Imagine your small business produces tiny remote control aircraft capable of long sustained flights. You are...
SPSS Module 5 Assignment—Independent t Test General Instructions:   In this assignment, we will be examining 2...
SPSS Module 5 Assignment—Independent t Test General Instructions:   In this assignment, we will be examining 2 Independent t tests and interpreting the results. As with previous assignments, the Aspelmeier and Pierce texts does a wonderful job of explaining how to actually run the tests in Chapter 7. Follow their instructions for interpretation of these test as you complete this assignment. Once again I have run the test and given you the SPSS output you will need to complete this assignment....
MATLAB Assignment 8 Introduction to Linear Algebra (Weeks 11 and 12) Spring, 2018 1. MATLAB Submission...
MATLAB Assignment 8 Introduction to Linear Algebra (Weeks 11 and 12) Spring, 2018 1. MATLAB Submission Problem 3 ( Due Date : May 24 (Thu) ) Referring to the instruction below, you are required to submit this problem. A common problem in experimental work is to find a curve y = f(x) of a specified form corresponding to experimentally determined values of x and y, say (x1, y1), (x2, y2), · · · , (xn, yn). The followings are the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT