1- Read a text file containing ‘m’ lines each line having ‘n’ positive numbers separated by commas ‘,’ and compute for each line (row) the arithmetic mean (average), rms average, geometric mean, and harmonic mean.
Apply your program on the following data file (named “numbers.dat”)
Load the file as follows:
load -ascii numbers.dat
Now you have a variable named ‘numbers’ that contain the values found in the file numbers.dat.
Notes: given the numbers
Arithmetic mean=, Geometric Mean=, RMS Average=
. Write a program that reads from the user three numbers representing the sides of a triangle. Check using the
triangle inequality whether the numbers represent a valid triangle or not and display an appropriate message.
If it is a valid triangle then
I. check whether the triangle is
[SIZE=3]FONT=Times New Roman right angle[/size][/font]
[SIZE=3]FONT=Times New Roman isosceles (two sides are equal)[/size][/font]
II. Using the relations in Kuncicky pages (54-55)
III. Display the largest angle in degrees.
• Triangle Inequality: A + B > C, A + C > B, C + B > A.
• In MatLab use radians Not degrees in trigonometric functions.
• In any triangle the largest angle corresponds to the largest side