with out using function:
run the folloing program
program:
disp( ' calculaion of one side knowing two sides and one angle');
b = input('enter the first side');
c= input('enter the second side');
alpha=input('enter the angle between them');
X= (b * b) + (c * c) - (2 * b * c) * (cos(alpha));
a = sqrt(X);
disp('third side is');
disp(a);
output:
>> side
calculaion of one side knowing two sides and one angle
enter the first side2.2
enter the second side4.4
enter the angle between them50
third side is
2.3491
with using function:
create two files funside.m and side.m in same directtory and run side.m
program:
disp( ' calculaion of one side knowing two sides and one angle');
b = input('enter the first side');
c= input('enter the second side');
alpha=input('enter the angle between them');
a=funside(b,c,alpha);
disp('third side is');
disp(a);
funside function:
function [ a] = funside( b,c,alpha )
%omputes third side with to side and one angle
% Detailed explanation goes here
X= (b * b) + (c * c) - (2 * b * c) * (cos(alpha));
a = sqrt(X);
end
The "for more practice part" using matlab If the lengths of two sides of a triangle...
MATLAB question Triangle Calculations (script with two anon functions) 0 solutions submitted (max: Unlimited) Consider a general triangle with side lengths a, b, and c and angles A, B, and C as shown below Write a script that does the following Define the following two anonymous functions and assign to the indicated Function Handles: 1. The function ThirdSide should accept the lengths of sides a and b as well as angle C in that order and use the Law of...
2. Write a program that prompts a user to enter the lengths of sides and angles for the two triangles described below. The program should calculate the length of the side of the triangle indicated below. Print the two answers to 3 decimal places onto the console screen Triangle 1 Read in the value of the angle, alpha, and the length, a, of the side indicated in the picture below. Calculate the length of the hypotenuse, c, of this right...
For the triangle below, you are given the lengths of two sides. 1. (15pts) For the triangle below, you are given the lengths of two sides, a=6 and b = 2. An angle a is shown, but its value is not given a) Use the triangle to find the exact values of the six trig functions at the angle a Sin a= Cos ar Csc a= Tan a= Sec a= Cot a= b) Use a calculator to find the values,...
14.) If two sides of a general triangle have lengths 22 in and 60 in and the third side must be a whole number of inches: (a) What is the longest possible length of the third side? (b) What is the shortest possible length of the third side?
Problem a (PA4a.java) Write a program to evaluate the area of a triangle given the lengths of its sides using Heron's Formula. Here is an outline: Get the three side lengths from the user (which might have decimal values): a, b, c. Check to ensure that the sides are valid for a triangle. Importantly, the sum of the lengths of any two sides must be larger than the length of the third side (you must check all three sides this...
***IN PYTHON: Scalene triangle: All sides have different lengths Isosceles triangle: Two sides have the same length Equilateral triangle: All sides are equal Write a program to ask for the length of 3 sides a, b and c. Ask for three sides at a time Determine the type of triangle given three sides Handle all kinds of errors - 1. not integers, int() conversion fails 2. not enough args, 3. too many arguments HINT: use the len() function to check...
C++ question-classes ? Implement a Triangle class in C++. The triangle is defined by its three side lengths - a, b, and c. The class includes appropriate class constructors and public and private methods that perform the following operations: is_triangle - checks whether the given side lengths form a proper triangle; area - returns the area of the triangle; perimeter - returns the perimeter of the triangle; angle_a, angle_b, angle_c - return the vertex angles (in degrees) opposite to side...
Java Please - Design and implement a class Triangle. A constructor should accept the lengths of a triangle’s 3 sides (as integers) and verify that the sum of any 2 sides is greater than the 3rd(i.e., that the 3 sides satisfy the triangle inequality). The constructor should mark the triangle as valid or invalid; do not throw an exception. Provide get and set methods for the 3 sides, and recheck for validity in the set methods. Provide a toString method...
Given a triangle with angle A = 93 degrees and sides a = 33 and b = 16. Find side c. c= Using the Law of Sines to solve the triangle if a = 13°,B= 23°, a = 20. Round to two decimal places. As in the text, (a, a), (B, b) and ( c) are angle-side opposite pairs. If no such triangle exists, enter DNE in each answer box. Preview degrees b= Preview Preview Due in 1 hours, 36...
Two sides and an angle (SSA) of a triangle are given. Determine whether the given measurements produce one triangle, two triangles, or no triangle at all Solve each triangle that results. a=15, c=18, A=53° Select the correct choice below and, if necessary, to in the answer boxes to complete your choice (Round side lengths to the nearest tenth and angle measurements to the nearest degree as needed.) A. There is only one possible solution for the triangle The measurements for the remaining side b...