Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2) Write a script that will: (1) use an input statement to prompt the user to enter the radius of a circular disk; (2) then

image text in transcribed

2) Write a script that will: (1) use an input statement to prompt the user to enter the radius of a circular disk; (2) then calculate the area of the disk based on the user input; and (3) use the fprintf function to print out the area using 6 decimal places. For example, your script shall work like this: Please enter the radius: 2.0 The area is 12.566371. 3) Write a script called Greeting that will first prompt the user for a name, and then prints a greeting with the name. Your script shall work exactly like the example below: >> Greeting What's your name? John Hello John! 4) In the metric system, fluid flow is measured in cubic meters per second (m/s). A cubic foot per second (ft/s) is equivalent to 0.028 m3/s. Write a script titled flowrate that will prompt the user for flow in cubic meters per second and will print the equivalent flow rate in cubic feet per second. Here is an example of running the script. Your script must produce output in exactly the same format as this: >> flowrate Enter the flow in m^3/s: 15.2 15.200 m^3/s is equivalent to 542.857 ft^3/s. 5) In hydrology, hyetographs are used to display rainfall intensity during a storm. The intensity could be the amount of rain per hour, recorded every hour for a 24-hour period. Write a matlab script that will first read in the data from 'raindata.dat' containing 24 hours' rain intensity in inches per hour; the script will then use a bar chart to display the intensities. Please show x- and y-axis labels and a title for the graph. 6) Write a script CalBMI to calculate a person's body-mass-index (BMI) using the equation: Weight (lbs) -X 703 Height (in)x Height(in) bmi =- Your script should work like the example below: >>CalBMI What's your weight in (lbs): 170 What's your height in [in]: 72 Your BMI is 23.1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

=+2. How might Fogleman clear her name if she is innocent?

Answered: 1 week ago

Question

121. If X is uniformly distributed on [1, 3], find the pdf of Y X2.

Answered: 1 week ago