Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

. Write a MATLAB script that asks the user to input the following: a. radius of a circle b. long and short axis of an ellipse c. length and width of a rectangle d. sides of a triangle Use the above...

1 answer below »

. Write a MATLAB script that asks the user to input the following:

a. radius of a circle

b. long and short axis of an ellipse

c. length and width of a rectangle

d. sides of a triangle

Use the above information to calculate the areas of the above shapes and save the areas to a text

file. Comment your code appropriately. Attach your code, a snapshot of your results and the

contents of the text file to your assignment as an appendix

Answered Same Day Feb 05, 2021

Solution

Kshitij answered on Feb 05 2021
127 Votes
solu/newcode.m
%%
prompt = 'enter radius of a circle ';
= input(prompt);
area_of_circle = pi*r^2;
prompt1 = 'enter value long axis of ellipse ';
a=input(prompt1);
prompt2 = 'enter value short axis of ellipse ';
=input(prompt2);
area_of_ellipse=pi*a*b;
prompt3 = 'enter value length of rectangle...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here