https://www.mathworks.com/matlabcentral/answers/89306-tangent-line-to-a-curve-at-a-given-point
%Example
t=0:0.01:10
y=sin(t)
plot(t,y)
%-------------------------
dy=diff(y)./diff(t)
k=220; % point number 220
tang=(t-t(k))*dy(k)+y(k)
hold on
plot(t,tang)
scatter(t(k),y(k))
hold off
gradient(y,t) is better than diff(y)/diff(t), because it applies a 2nd order method. At least this is true for numerical differentiation. Does this concern symbolic operations also? I cannot test this, because I do not have the symbolic toolbox.
'Computer Vision' 카테고리의 다른 글
awesome-object-proposals (0) | 2017.02.28 |
---|---|
Creating Computer Vision and Machine Learning Algorithms That Can Analyze Works of Art - 화가들의 작품을 분석하여 영향을 끼친 그림들을 찾아내고 그림들을 시간순으로 분석해냄 (0) | 2016.12.08 |
cosine similarity matlab code (0) | 2016.11.29 |
Iris Recognition Algorithms Comparison between Daugman algorithm and Hough transform on Matlab (0) | 2016.05.11 |
facerec framework (0) | 2016.05.10 |