How Do You Calculate Triangle Peak Equations in MATLAB?

  • Thread starter Thread starter Spoolx
  • Start date Start date
  • Tags Tags
    Triangle
Click For Summary

Homework Help Overview

The discussion revolves around calculating equations for a triangle peak in MATLAB, specifically focusing on the geometry of triangles and their linear equations based on given points. The original poster seeks clarification on deriving these equations based on a diagram and specific peak locations.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss determining the equations of lines connecting specific points on a triangle. Questions arise regarding the slopes and the correct formulation of equations based on different peak positions. There is also an exploration of the slope-intercept form and how to apply it to the triangle's geometry.

Discussion Status

Participants are actively engaging with each other's contributions, with some providing insights and clarifications on the slopes and equations. There is an ongoing verification process regarding the correctness of the equations derived for different triangle configurations, indicating a productive exchange of ideas.

Contextual Notes

Participants are working within the constraints of MATLAB for engineering classes and are focused on specific peak locations of the triangle, such as 2/3L and 3/4L. There is mention of needing to verify equations based on the geometry presented in a diagram, which is not included in the discussion.

Spoolx
Messages
38
Reaction score
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: 509
Physics news on Phys.org
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   Reactions: 1 person
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:
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
 
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
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
11
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
2K