Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE MATLAB TO SOLVE Density (b) of a material is defined by its mass, m, per unit volume, V: BE Density is a physical property

image text in transcribedUSE MATLAB TO SOLVE

Density (b) of a material is defined by its mass, m, per unit volume, V: BE Density is a physical property of matter, specific to each material. The density of Aluminum- 7178 is 2.83 g/cm3 Write a MATLAB script that computes the volumes (m) and the corresponding masses (kg) of Aluminum-7178 spheres from user input radii. The volume of a sphere is defined as: 4 V= where r is the radius. p3 a. In your *ExamIScripts.m file, write a script that accepts the Radius input from a user and outputs a table of Radius, Volume, and Mass for Aluminum spheres. The script will prompt the user to enter the minimum value of the radius (in cm) and then prompts the user to enter the maximum value of the radius (in cm). The radius is increased between the minimum and the maximum value with a 2.54 cm increment. The script calculates then outputs a table of volumes in [m] (3 decimal places) and the masses in [kg] (2 decimal places) for each radius in [cm] (2 decimal places). Hint: Be aware of units. The output table should be formatted as shown below. Table output: Volume and Mass of Aluminum-7178 spheres at user specified Radii Radius [cm] Volume [m 3] Mass [kg] ## ## #. ### ###. ## ##.## #. ### ####.## ##.## #. ### ####.## b. In the same section, create Figure 5 with 2 subplots in 1 row. In the first subplot, plot Mass vs Radius as a red dotted line with a linewidth of 2. Include a title in bold face, x-axis and y-axis label, units, and grid lines. In the second subplot, plot Mass vs Volume as a black dashed line with a linewidth of 2. Include a bold- faced title, x-axis label, units, and grid lines. Include the code for this problem as a section of your script. Include the problem number and comments/pseudocode

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 Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago