Tangent Line and Normal Line

4 views (last 30 days)
ivi_
ivi_ on 3 Feb 2024
Edited: Sam Chak on 3 Feb 2024
Can someone help me with this matlab script please.
  2 Comments
Dyuman Joshi
Dyuman Joshi on 3 Feb 2024
> Use diff, instead of defining the first derivative manually. Same for y0 and m, use the variables to obtain the corresponding values. DO NOT hard-code values.
> Use fplot over ezplot
Sam Chak
Sam Chak on 3 Feb 2024
Edited: Sam Chak on 3 Feb 2024
Is there a MATLAB function to find the normal line directly from the given coefficients? I believe we can do that using matrix algebra and rotation matrix.
Update:
Tangent line:
Normal line:

Sign in to comment.

Answers (1)

VBBV
VBBV on 3 Feb 2024
f(x) = x^3 - 3*x + 2
instead of
f(x) = 3^x - 3*x + 2
  1 Comment
VBBV
VBBV on 3 Feb 2024
Edited: VBBV on 3 Feb 2024
The function input for f(x) is incorrect

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!