Question: This question must be answered using Matlab 6. (8pts) a. Write a function rectpyramidarea to calculate the surface area of a right rectangular pyramid that

This question must be answered using Matlab This question must be answered using Matlab 6. (8pts) a. Write a

6. (8pts) a. Write a function rectpyramidarea to calculate the surface area of a right rectangular pyramid that accepts the base length 1, the base width w, and the pyramid height h as inputs and returns the surface area corresponding to the following equation: W 2 area = lw + I h2 + + w h+ +63* Here are examples of using the function: >>rectpyramidarea (1,1,1) ans = 3.2361 >>help rectocamidarea zectpyramidarea calculates the surface area of a right rectangular pyramid b. (4pts) Write a script to prompt the user for the base length, base width, height of a right rectangular pyramid. Then call the function rectpyramidarea in (a) to calculate the surface area of the right rectangular pyramid and print the surface area with 1 decimal place

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!