find the equation of tangent to the curve y=2(x^1/2) at (1,2)

조회 수: 3 (최근 30일)
Nishanth G
Nishanth G 2020년 11월 23일
편집: Stephan 2020년 11월 23일
since i am new to matlab plese help me out with this assignment
find the equation of tangent to the curve y=2(x^1/2) at (1,2)
  댓글 수: 3
Nishanth G
Nishanth G 2020년 11월 23일
syms s(t) f(x)
f(x)=input("enter the function")
m=diff(f,x)
x1=input("enter the value of x for slope point")
y1=input("enter the value of y for slope point")
y=m*(x-x1)+y1
print(y
i got till this i need to apply x1 value in m , how do i do that ?
Nishanth G
Nishanth G 2020년 11월 23일
thanks got it

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

채택된 답변

Stephan
Stephan 2020년 11월 23일
편집: Stephan 2020년 11월 23일
  댓글 수: 1
Stephan
Stephan 2020년 11월 23일
편집: Stephan 2020년 11월 23일
syms f(x)
f(x) = 2*(x^(1/2)) % symbolic function
Df = diff(f,x) % derivative
m = Df([1 2]) % values of slope for x=1 & x=2 in a vectorized manner
m_vals = double(m) % convert symbolic (exact) results to numeric

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by