EGN3615 SInhgad College of Engineering Numerical and Computer Tools HW3 Numerical and Computer Tools please read all questions carefully and Show all your work clearly 🙂 Include comments in your scripts! Numerical and Computer Tools I – Homework 3
Include comments in your scripts
Separate the scripts with %% and submit the script file to Canvas before class.
1) Given that 1 inch = 2.54 cm, write a script that converts meters to feet and displays the result.
Start the script with: clear, clc, meters =
2) Write a script to calculate and display the length of the hypotenuse of a right triangle given the
lengths of the other two sides.
Start the script with clear, clc, sideA = , sideB =. Use the variables sideA and sideB for
calculations so that if numbers stored in sideA and sideB are changed, the calculations will
change.
3) Write a local function that calculates the volume of cylinders. Pass the cylinder height and radius to
the function and have the function return the volume. Write a separate script that creates a variable
that contains the height of the cylinder and another variable that contains the radius. Have the script
call the function to get the volume and then the script should display the volume as cylinderVolume =
xxx where xxx is the volume. Four decimal places is sufficient. The volume of a cylinder is the base area
times the height.
Purchase answer to see full
attachment
LDR 3302-21.01.01-1A24-S1, Organizational Theory and Behavior Unit III Essay Top of Form Bottom of Form…
Chapter 9 What are teratogens? Give 5 examples. Define each of these stages: Germinal, embryonic,…
You are a Financial Analyst that has been appointed to lead a team in the…
You are familiar with the ANA Code of Ethics and have a growing understanding of…
This week’s discussion will focus on management decision-making and control in two companies, American corporation…
Mary Rowlandson felt that the man who eventually came to own her, Quinnapin, was “the…