L'hopital rule doesn't work?

조회 수: 1 (최근 30일)
Andy
Andy 2012년 10월 13일
I'm making an application to use l'hopital's rule. When I use this function, nothing comes up for it. Why so?
function y=mylhopital(f,g) %f&g are function handles
syms x
while(limit(f,x,0)==0 & limit(g,x,0)==0) %When the limit of f(x) and g(x) approaches to zero and the value is both zero
f=diff(f(x)); %Differentiate f with respect to x
g=diff(g(x)); %Differentiate g with respect to x
end
y=limit(f,x,0)/limit(g,x,0);

채택된 답변

Matt J
Matt J 2012년 10월 13일
You didn't assign diff(f(x)) and diff(g(x)) to anything.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by