Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write a MATLAB program that will allow the user to find area and circumference of a circle. Selections and data entry will be done by presenting the user with a menu (using menu function) and provide her/him with the following choices: 

? Enter the radius 

? Display the area 

? Display the circumference 

? Exit 

Other Requirements: 

? Selecting choice 2 or 3 before entering the radius will result in an error message. The program will terminate only when Exit has been selected ? 

Calculations will be done by functions. 

Function circleInfo() will ask for the radius and will return it. 

Function circleArea() will accept a parameter, the radius, and returns the area. 

Function circleCircum() will accept a parameter, the radius, and returns the circumference. 

? Results are displayed with 2 decimal place accuracy. 

Partial Help with the menu: 

flag =0; 

%Calculation 

while (1) 

choice=menu('Circle and Cylinder', 'Enter the radius','Display the area', 'Display the circumference','Exit'); 

switch(choice) 

case 1 

r=circleInfo(); 

flag=1; 

case 2 if (flag==0) 

disp('you need to enter the radius first'); 

else area=circleArea(r); 

end 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91373517
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Computer Engineering

Question suppose you are given two stacked s and twrite an

Question : Suppose you are given two stacked S and T. Write an algorithm to transfer all elements from S to T so that the top of S is the first to be inserted onto T, and the bottom of S ends up at the top of T.

A professor collected data on the number of absences in an

A professor collected data on the number of absences in an introductory statistics class of 100 students over the course of a semester. The data are summarized below. Number of Absences 0 1 2 3 4 5 6 Number of Students 5 ...

Legacy industries inc has a historic pe multiple of 15 a

Legacy Industries Inc. has a historic P/E multiple of 15, a current EPS of $2.50 projected to grow by 4% in the coming year, and a forward looking P/E multiple of 18. With this information please estimate the current pri ...

Answer the following question whats the difference between

Answer the following Question : What's the difference between public, protected, and private members? What's the difference between static binding and dynamic binding?

The next four questions are based on the following you

The next four questions are based on the following: You invested a lump sum of $50,000 in a new company ten years ago and left it there without any further investments and now, today, the company listed on the stock exch ...

Question lessons learned from the mirai botnet attack of

Question: Lessons learned from the Mirai Botnet attack of 2016 • Research the history of the attack and those responsible. • What did this exploit? • Why was it so much more effective than previous BotNet designs? • What ...

Start from scratch on each of the parts write a main

Start from scratch on each of the parts. Write a main function that declares an array of 100 doubles. In a for loop, assign each of the doubles a random number between 0.50 and 50.00. Here's how. array[i] = (double) (ran ...

Question suppose we have a system with frequency of

Question : Suppose we have a system with frequency of floating point operations = 35%. What should be the speedup of floating point operation in our design of the next CPU to achieve a desired overall system speedup in t ...

Python programmingplease i would like some help in checking

Python programming Please I would like some help in checking if my source code for is susceptible to short-circuit evaluation.I don't need answers, I just need corrections. The source code is to check the integer parts o ...

How can word processing software give a person the ability

How can Word Processing software give a person the ability to better position themself or a business, in today's society? Why?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As