Let P be a point in Oxy plane and let p be a 1×2 array representing an one-degree or zero-degree polynomials, if its first entry is a non-zero constant or a zero constant, respectively.
Break the given line by building a piecewise linear function constituted by two branches:
  • one branch stands for the parent polynomial p;
  • and another branch stands for the perpendicular line, r, to p that passes by the point P (see figure below).
Given (P, p), find
  • R, the breaking point;
  • r, the 1×2 array that represents the perpendicular line. If r violates the definition of a function, return r = ''.
input: (P, p)
output: (R, r)
Break line

Solution Stats

9 Solutions

5 Solvers

Last Solution submitted on Feb 01, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers5

Suggested Problems

More from this Author17

Community Treasure Hunt

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

Start Hunting!