Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 [20 marks] (i) The volume of a circular cone of height h and radius r is given by V=31r2h. Write a MATLAB function

image text in transcribedimage text in transcribed

Question 4 [20 marks] (i) The volume of a circular cone of height h and radius r is given by V=31r2h. Write a MATLAB function conevol to compute the volume V of the circular cone for arbitrary values of r and h. (ii) The distance between any two points P(x1,y1) and Q(x2,y2) is given by: DistancePQ=(x1x2)2+(y1y2)2. And the area of a triangle is given by: AreaA=s(sa)(sb)(sc) where a,b, and c are the lengths of the sides of the triangle, and s is equal to half the sum of the lengths of the three sides of the triangle. Write a script that will prompt the user to enter the coordinates of three points that determine a triangle (e.g., the x and y coordinates of each point). The script will then calculate and print the area of the triangle. It will call one function to calculate the area of the triangle. This function will call a subfunction, which calculates the length of the side formed by any two points (the distance between them)

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

Students also viewed these Databases questions

Question

Organizing Your Speech Points

Answered: 1 week ago