Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ortfolio Robinhood 28 / 61 100% + @ HW 3 (25 pts) Do not suppress user inputs. Instructor wants to see what values were entered

image text in transcribed
image text in transcribed
ortfolio Robinhood 28 / 61 100% + @ HW 3 (25 pts) Do not suppress user inputs. Instructor wants to see what values were entered by the user. 1 1. [3 pts] Calculate the area A of a triangle A= base height Prompt the user to enter the values for the base and for the height. 2. [4 pts) Create a vector that starts at a, ends at b, and has a spacing of c. Allow the user to input all of these parameters. 3. 12 pts) Prompt the user to enter a matrix and then use the 'max" function to determine the largest value entered 14. [3 pts] Use two separate input statements to prompt a user to enter his or her first and last names. Use the diap function to display those names on one line. (You'll need to combine the names and some spaces into an array) 5. (3 pts] Prompt the user to enter his or her age. Then use the diap function to report the age back to the command window. IF, for example, the user enters 5 when prompted for her age, your display should read Your age in s This output requires combining both character data (a string) and numeric data in the disp function which can be accomplished by using the num2str function, Portfolio Robinhood 28 / 61 100% + one line. (You'll need to combine the names and some spaces into an array.) 5. [3 pts) Prompt the user to enter his or her age. Then use the disp function to report the age back to the command window. If, for example, the user enters 5 when prompted for her age, your display should read Your age is 5 This output requires combining both character data (a string) and numeric data in the disp function-which can be accomplished by using the num2atr function 6. [3 pts) Prompt the user to enter an array of numbers. Use the length function to determine how many values were entered, and use the disp function to report your results to the command window. 7. [4 pts] Before calculators were readily available (about 1974), students used tables to determine the values of mathematical functions like sine, cosine, and log. Create such a table for sine, using the following steps: Create a vector of angle values from 0 to 2 in increments of/10 Calculate the sine of each of the angles, and group your results into a table that includes the angle and the sine. Use disp to create a title for the table and a second diap command to create column heading Use the fprintf function to display the numbers. Display only two val- les past the decimal point. 8. (3 pts] Use fprintt to create the multiplication tables from 1 to 13 for the num ber 6. Your table should look like this I times 6 i 6 2 times 6 is 12 3 times 6 is 18 B

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

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

What is paper chromatography?

Answered: 1 week ago

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago

Question

2. What, according to Sergey, was strange at this meeting?

Answered: 1 week ago