Draw a tangent line with a given slope in Log scale

조회 수: 1 (최근 30일)
Mohiedin Bagheri
Mohiedin Bagheri 2021년 9월 10일
편집: Mohiedin Bagheri 2021년 9월 12일
Dear all,
I have a graph datapoints loaded in MATLAB. Y axis is Voltage (E) and x-axis is in Log scale. I have to draw a tangent line to this curve with a given of 50 V/dec in MATLAB. I also need to find the point where the tangent line crosses the curve. I appreciate that if someone could help.
I really appreciate your help in advance.

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 9월 10일
To compute the tangent line of this curve, I would do the followings:
(1) Get the numerical data of the curve (shown in your plotted Figure)
(2) Find the polynomial (quadratic) fit model E(x) formulation using, e.g.: fit() or polyfit() or ...
(3) Take a symbolic derivative of E(x) formulation => dE(x)
(4) Compute dE(50) and E(50)
(5) Plug in the computed values in step 5 into this equation: y = dE(50)*(x-50) + E(50). This would be the tangent line equation for that point of x = 50.
(6) Plot the found tangent line data along with the original curve data.
  댓글 수: 3
Image Analyst
Image Analyst 2021년 9월 12일
@Mohiedin Bagheri, make it easy for people to help you not hard. That means first reading the posting guidelines:
and then secondly, you will then know that you were supposed to attach your data. Don't force people to make code to somehow create data similar to yours when you already have it. Just attach your variable in a .mat file with the paperclip icon.
Mohiedin Bagheri
Mohiedin Bagheri 2021년 9월 12일
@Sulaymon Eshkabilov attached is my .m file data. Thank you

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by