How Do You Calculate Triangle Peak Equations in MATLAB?

  • Thread starter Thread starter Spoolx
  • Start date Start date
  • Tags Tags
    Triangle
AI Thread Summary
The discussion focuses on calculating triangle peak equations in MATLAB, specifically for a triangle with its peak at 3/4L. The user seeks assistance in deriving the equations based on given points and slopes, initially outlining the slopes as m1 = 4h/3L and m2 = -4h/L. They present their equations as equation 1 = 4hx/3L and equation 2 = -4hx/L + 12h. A suggestion is made to verify the equations by substituting x = L to check if y equals 0. The user is encouraged to confirm their calculations for accuracy.
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: 493
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 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
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'Calculation of Tensile Forces in Piston-Type Water-Lifting Devices at Elevated Locations'
Figure 1 Overall Structure Diagram Figure 2: Top view of the piston when it is cylindrical A circular opening is created at a height of 5 meters above the water surface. Inside this opening is a sleeve-type piston with a cross-sectional area of 1 square meter. The piston is pulled to the right at a constant speed. The pulling force is(Figure 2): F = ρshg = 1000 × 1 × 5 × 10 = 50,000 N. Figure 3: Modifying the structure to incorporate a fixed internal piston When I modify the piston...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top