How to calculate a natural logarithm of a function handle?

조회 수: 3 (최근 30일)
Max
Max 2016년 2월 10일
편집: Matt J 2016년 2월 10일
Hello,
I would like to calculate the ln of the function Inum which is an integral of a symbolic function y(t). For that I converted y(t) into a function handle.
ynum=matlabFunction(y);
Inum=@(x)integral(ynum,0,tfail(i));
f = log(Inum);
Does anybody know why the code above is not working?

답변 (1개)

Matt J
Matt J 2016년 2월 10일
편집: Matt J 2016년 2월 10일
You define Inum as an anonymous function of x, but 'x' appears nowhere in the expression
integral(ynum,0,tfail(i))
Also, since Inum is a function, then its log should also be a function
f=@(x) log(Inum(x));

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by