tangent
tangent in matlabunknown
matlab
3 years ago
264 B
6
Indexable
clc
clear all
syms x
y=input('enter function in terms of x:')
x1 = input('enter tangent x value:')
D=[x1-2 x1+2]
ezplot(y,D)
hold on
yd = diff(y,x);
slope = subs(yd,x,x1);
y1 = subs(y,x,x1);
plot(x1,y1,'ko')
Tgt_line = slope*(x-x1)+y1
h = ezplot(Tgt_line,D); Editor is loading...