MATLAB Answers

Does anyone know how to calculate the slope of elliptical line by using the matlab?

2 views (last 30 days)
huazai2020
huazai2020 on 8 Jul 2020
Commented: huazai2020 on 12 Jul 2020
I have some data of the elliptical line, does anyone know how to calculate the slope of elliptical line by using the matlab?
  4 Comments
John D'Errico
John D'Errico on 9 Jul 2020
Or, given that equation, differentiate, recognizing that d/dx applied to x^2 is 2*x. d/dx applied to y^2 is 2*y*dy/dx. Now solve for dy/dx.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 8 Jul 2020
Exactly what is an "elliptical line"? That's a new one on me. I know lines, and I know ellipses, but not an elliptical line. What is it?
Anyway, if you have "some data" on a line, you can get the slope of a line fitted through your "some data" from the polyfit() function.
coefficients = polyfit(x, y, 1);
The slope of the line fitted through the x and y points is
slope = coefficients(1);
  5 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!