Find the altitudes of a triangle - MATLAB Cody - MATLAB Central

Problem 58548. Find the altitudes of a triangle

Difficulty:Rate
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the coordinates of the endpoints of the altitudes of the triangle as well as the coordinates of the orthocenter. The coordinates of the endpoints should be in the order of the corresponding vertices, and the function should work when one of the angles is obtuse.

Solution Stats

71.43% Correct | 28.57% Incorrect
Last Solution submitted on May 23, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
18
8

Problem Recent Solvers5

Suggested Problems

More from this Author291

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page