Question

Write a MATLAB program to find hypotenuses and Area of Triangle h^2+b^2=c^2 A = ½ b...

Write a MATLAB program to find hypotenuses and Area of Triangle h^2+b^2=c^2 A = ½ b h

Homework Answers

Answer #1

%CODE

h=input("Enter value of h : ")
b=input("Enter value of b : ")
%hypotenuses
c = (h^2 + b^2)^(0.5);
%Area calculation
A = (0.5)*(b*h);

fprintf("hypotenuses : %f\n",c)
fprintf("Area : %f",A)

%OUTPUT

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a python program that calculates the area of triangle. The user will be asked to...
Write a python program that calculates the area of triangle. The user will be asked to enter the base (b) and the height (h). The formula to calculate the area is: Triangle_area=(bh)/2 Note: the program should print the area to the user: (for example: the area of the triangle is: 34.3)
MATLAB QUESTION a)The area of a triangle is represented by the equation ½ x B x...
MATLAB QUESTION a)The area of a triangle is represented by the equation ½ x B x H. If the base and height varies from 0 to 10 m, what are the areas for the triangle. Your answer should be a one row matrix.
Write a C++ program to find the area of a shape whose area is given by...
Write a C++ program to find the area of a shape whose area is given by the formula Area = 2+4r + πr^6
Find the area of a triangle with vertices A (1, 4, -1), B (-1, 2, 0),...
Find the area of a triangle with vertices A (1, 4, -1), B (-1, 2, 0), C (1, 1, 3).
Write a basic c++ program to check whether a triangle is valid or not if the...
Write a basic c++ program to check whether a triangle is valid or not if the three sides are given: A triangle is valid if the sum of its two sides is greater than the third side. Let’s say that a, b, c is the sides of the triangle. A valid triangle must satisfy all these conditions: a + b > c a + c > b b + c > a (2 points) Generate random numbers 1-15 inclusive for...
MATLAB 2017b Write a program which will: Accept three numbers from the user: a, b and...
MATLAB 2017b Write a program which will: Accept three numbers from the user: a, b and c which can assume any value. Accept Dx and Dy for the calculations of the function Write a function which accept a, b, c, Dx and Dy and will draw the following surface Where x and y vary in the range of -10?x?10 -10?y?10. Allow the user to rerun the program and exit the program upon request.
Q) Write a computer program to test the stability of any continuous-time LTI system.( using Matlab)...
Q) Write a computer program to test the stability of any continuous-time LTI system.( using Matlab) Test your program on the impulse response.   h(t)= e^(-2t) u(t) Attached the program (Matlab) file and a screen shot of the results.
Write a Matlab program to find the autocorrelation of the following signal : g(t) = e-atu(t)...
Write a Matlab program to find the autocorrelation of the following signal : g(t) = e-atu(t) , a > 0 . Then , use the Wiener-Khintchine theorem to determine the energy spectral density of the signal . Use this program to display the autocorrelation function and the energy spectral density .
Data Table 2.1 Triangle Width W (cm) Height h (cm) Area of Triangle Wxh (2cm²) 2...
Data Table 2.1 Triangle Width W (cm) Height h (cm) Area of Triangle Wxh (2cm²) 2 1 09.40 3.20 15.04. 2 15.25 1.90 14.49 3 16.60 1.75 14.53 4 16.20 1.85 14.99 5 12.10 2.45 14.82 6 07.90 3.75 14.81 Average area = 14.78 % difference =           55   % Does the calculation of this table support Kepler's second law? Explain why or why not.
This question is about the C program(NOT C++ program) Please write the C program to find...
This question is about the C program(NOT C++ program) Please write the C program to find out the largest and the smallest number in 32bits For example ,the smallest number in 32 bits is -2147483648
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT