The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with 3.2, please help me with every detail of this problem.Â
Â
Â
Home Work 3.1
1. Use execution control statements to sort an array in ascending order which is entered by the
user
2. Now sort the same array using MATLAB’s inbuilt command sort()
Hints for HW3.1: Use input() to get the array from the user
Use if, if-elseif, for and other statements to develop an algorithm following the flow mentioned
below Get number of
rows and
columns in the
array Get
array(input)
from user Start from the
first
number(first
row, first
column) Compare it
with all the
elements in
the array If selected
number is
greater than
any of the
next numbers,
swap their
location Select the
next number
and repeat
process for all
locations in
the array Home Work 3.2
1. Write a user-written function that will calculate volume and area of a cylinder for dimensions,
the height and the radius provided by the user
2. For the cylinder in the Q1 if we are required to paint the complete cylinder find how much paint
is required
3. If the cylinder in Q1 is made up of Aluminum, find how much would be the material cost
involved.
4. Now print all the results/details using ‘fprintf()’
Hints for HW3.2: Use input() to get height and radius of the cylinder
Use geometrical formulas to get volume(base_area*height) and surface area of the
cylinder(base_circumference*height+base_area*2)
Find rate of Aluminum from online resources(Google,etc)eg. 0.85$/lb
Find mass of the cylinder using density of Aluminum and use the rate you found
Use fprintf() to print a statement which gives all the details that were asked in the HW3.2
including the specifications of the cylinder
-----------