find the volume if pyramid, MATLAB Programming

Assignment Help:
Write a script to determine the volume of a pyramid, which is 1/3 * base * height, where the base is length * width. On time the user to enter values for the length, width, and the height and then determine the volume of the pyramid. When the user enters every value, they will then be prompted also for either ''i'' for inches, or ''c'' for centimeters. (Note 2.54 cm = 1 inch). Your script should print the volume in cubic inches with 3 decimal places. As an instance, the output might look like this:



This script will calculate the volume of a pyramid.

Enter the length of the base: 50

Is that i or c? i

Enter the width of the base: 6

Is that i or c? c

Enter the height: 4

Is that i or c? i

The volume of the pyramid is xxx.xxx cubic inches.

Related Discussions:- find the volume if pyramid

Customizing a plot: line types, Customizing a Plot: Line Types, Color, Mark...

Customizing a Plot: Line Types, Color, Marker Types: Plots can be completed in the Command Window, if they are really simple. Though, at many times it is desirable to customiz

Estimate the sample mean and sample standard deviation, The fuel consumptio...

The fuel consumption of a certain make of car may not be exactly that rated by the manufacturer. Suppose ten cars of the same model were tested for combined city and highway fuel c

Transportation problem, I want codding in matlab for vogel approximation me...

I want codding in matlab for vogel approximation method . i mean .M file for vogels approximation method.

Introduction to handle graphics, In this lab, we implement vectors, script ...

In this lab, we implement vectors, script and functions with plot. Plot function is used to plot the point into graph. These plots are handled by handle (h).  These handle is used

Matlab code to run simulations of a batch reactor , Background Protein ther...

Background Protein therapeutics are a major component of the biotechnology industry, with sales estimated in the range of ~$99bn annually (2011) and steady market growth. Many phar

Illustration of switch statement, Illustration of switch statement: He...

Illustration of switch statement: Here are the two illustrations of calling this function: >> quiz = 22; >> lg = switchletgrade(quiz) lg = X >> quiz = 9; >>

Design of controller, Design a controller which regulates flow and compensa...

Design a controller which regulates flow and compensate pressure to my desire value in simscape.

Implement the physat algorithm, Your task is to implement the PHYSAT algor...

Your task is to implement the PHYSAT algorithm in Matlab to classify the phytoplankton species in the data you have selected. An algorithm demonstrating one solution is provided b

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd