Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

USE MATLAB Problem 3 (10 pts) You will write a program to ask the user to enter

ID: 2314201 • Letter: U

Question

USE MATLAB

Problem 3 (10 pts)

You will write a program to ask the user to enter the data in the table given below (prompt the user using inputcommand), and store it in a structure array. (Hint: You will be using a while loop; at the end of the each loop, ask user if they want to enter more data, if yes, add another entry into the structure, else stop). The name of yourstructure array should be planet (to store information about the planets), and the field names for the structure array are: name, mass, year, velocity.

Explanation / Answer

GIVEN:

A program to ask the user to enter the data in the table given below (prompt the user using inputcommand), and store it in a structure array.