How Do You Calculate Triangle Peak Equations in MATLAB?

  • Thread starter Spoolx
  • Start date
  • Tags
    Triangle
In summary, the conversation was about understanding and determining equations for a given diagram, specifically for a triangle with the peak at 2/3L and 3/4L. The person asked for help in creating the equations and Chet provided guidance on how to determine the equations using slope-intercept form. The equations for the two lines were found to be 4hx/3L and -4hx/L + 12h or (4h(3L-x))/L. Chet encouraged the person to verify the equations themselves and suggested substituting x = L to check if y = 0.
  • #1
Spoolx
38
0
Hi,
I am working on some MATLAB for my engineering classes and I need help with understanding a given diagram.

In the attached diagram, I need help understanding how we determined the equations

For example, I would like to know the equations for a triangle with the peak at 2/3L

I know the equations would be from

0<=x<=2/3L
2/3L<=x<=L

but I need help creating the equations.

Thanks!
 

Attachments

  • Untitled.png
    Untitled.png
    2.6 KB · Views: 438
Physics news on Phys.org
  • #2
If you have two points on a straight line at (0,0) and (L/2,h) and you are asked to determine the equation of that line, do you know how to determine it, say, in slope-intercept form?

Same thing for the other line through the points (L/2,h) and (L,0).

Chet
 
  • Like
Likes 1 person
  • #3
Okay that makes sense, but when I solve like that I end up with a negative in the second equation and still not sure where the x comes in
m1=h/L/2 or 2h/L
m2=-h/L/2 or -2h/L

I apply that to my 2/3 triangle

m1=3h/2L
m2=-3h/L
both my m2's are negative but the given equation has the original m2 as positive.

btw thanks for the tip so far

EDIT:

actually give me a minute before you answer, i think I need to plug it into y=mx+b
 
Last edited:
  • #4
So my actual problem has the triangle peak at 3/4L and the peak is represented by hplease verify my equations
slope 1 = 4h/3L
slope 2 = -4h/L

equation 1 = 4hx/3L
equation 2 = -4hx/L + 12h or (4h(3L-x))/L

Please verify I did it correctly

Thank you
 
  • #5
Spoolx said:
So my actual problem has the triangle peak at 3/4L and the peak is represented by h


please verify my equations
slope 1 = 4h/3L
slope 2 = -4h/L

equation 1 = 4hx/3L
equation 2 = -4hx/L + 12h or (4h(3L-x))/L

Please verify I did it correctly

Thank you
You can verify it yourself. In eqn 2, if you substitute x = L, do you get y = 0?

Chet
 

1. What are the three types of equations of a triangle?

The three types of equations of a triangle are the Pythagorean Theorem, the Law of Sines, and the Law of Cosines.

2. How do you use the Pythagorean Theorem to solve for missing sides of a right triangle?

The Pythagorean Theorem states that in a right triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides. This can be represented as a^2 + b^2 = c^2, where a and b are the lengths of the two legs and c is the length of the hypotenuse. To solve for a missing side, plug in the known values and solve for the missing variable.

3. How do you use the Law of Sines to solve for missing angles in a triangle?

The Law of Sines states that in any triangle, the ratio of the length of a side to the sine of its opposite angle is constant. This can be represented as a/sin(A) = b/sin(B) = c/sin(C), where a, b, and c are the lengths of the sides and A, B, and C are the corresponding angles. To solve for a missing angle, plug in the known values and use algebra to isolate the angle variable.

4. Can the Law of Cosines be used to solve for missing angles in a triangle?

Yes, the Law of Cosines can be used to solve for missing angles in a triangle. This law states that in any triangle, the square of the length of a side is equal to the sum of the squares of the lengths of the other two sides minus twice the product of those two sides and the cosine of the included angle. This can be represented as c^2 = a^2 + b^2 - 2abcos(C), where c is the length of the side opposite angle C. To solve for a missing angle, plug in the known values and use algebra to isolate the angle variable.

5. How do you know which equation to use when solving a triangle?

To determine which equation to use when solving a triangle, you need to know what information is given and what information you are trying to find. If you are given two sides and an angle, you can use the Law of Cosines. If you are given two angles and a side opposite one of the angles, you can use the Law of Sines. If you are given two sides and the angle between them, you can use the Pythagorean Theorem. If you are given three sides, you can use any of the three equations. It is important to also check if the triangle is a right triangle, as this will determine which equation to use as well.

Similar threads

  • Introductory Physics Homework Help
Replies
2
Views
925
  • Introductory Physics Homework Help
Replies
13
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
800
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
884
Back
Top