Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me in this MATLAB, thank you Lab 5 Triangle (in class) CSCI 251 Problem Statement Write a function triangle to calculate the

Can someone help me in this MATLAB, thank you image text in transcribed
image text in transcribed
Lab 5 Triangle (in class) CSCI 251 Problem Statement Write a function triangle to calculate the length of the third side of a triangle and its area. Also write how this function would be called in your main program triangleTest yourLastName.m Input Data .Length of the first side of a triangle Length of the second side of a triangle The angle between them, in degrees Output Data .Length of the third side Area of the triangle Before You Begin 1. Start MATLAB (Start> All Programs> MATLAB R2017a) and change your Current Folder to the location of your hard drive (e.g., E:/MATLAB programs/) If you forget to do this, your MATLAB programs will not be accessible whenever the computers in this lab are cleared, which is throughout the semester 2. In the Command Window, type edit triangle yourLastName.m MATLAB should prompt that the file does not currently exist, select OK so MATLAB will create the file in your Current Folder Starting File Include header comments (ie., at the beginning of your file) formatted as show below. Your electronic submission of the program file will represent your endorsement of the Honor Code Statement. % Course: CSCI 251, Section X % Student Name: Jane Doe % Student ID: 12345678 %Lab 5 in class % Due Date: % In keeping with the Honor Code of UM, I have neither given nor received assistance % from anyone other than the instructor % Program Description: Algorithm 1. Clear the Command Window and Workspace windows 2. Write the function header, remember the function name must match name of the m- file!! 3. The function triangle takes in three parameters, length of the first side, length of the second side, and angle between them. And after calculation, it returns two results length of the third side and area of the triangle (refer to the formulas on next page) 4. Create another file triangleTest yourLastName.m (this is the main program used to test the triangle function)

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What are the benefits of planning for growth?

Answered: 1 week ago

Question

What are the purposes of promotion ?

Answered: 1 week ago