. 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 DayFeb 05, 2021

Answer To: . Write a MATLAB script that asks the user to input the following: a. radius of a circle b. long and...

Kshitij answered on Feb 05 2021
125 Votes
solu/newcode.m
%%
prompt = 'enter radius of a circle ';
r = 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 ';
b=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