필터 지우기
필터 지우기

how to take logarithm of a functional form in matlab?

조회 수: 3 (최근 30일)
Tanvir Kaisar
Tanvir Kaisar 2016년 11월 10일
댓글: Tanvir Kaisar 2016년 11월 11일
I have defined a function- >>f=inline('x*y','x','y') Now when i take log of this- >>logarithm=inline(log(f(x,y)),'x','y') Matlab simply shows log(x.*y) HOW CAN I GET THE ANSWER "logx+logy" instead?

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 10일
You might be able to do it with the symbolic toolbox, though I would have to experiment to figure out how messy it is.
You should not be writing any new inline() unless you need backwards compatibility with something already written. Anonymous functions have replaced inline()
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 11월 10일
syms x y positive
expand( log(x*y))
Tanvir Kaisar
Tanvir Kaisar 2016년 11월 11일
It worked! Thank u! :)

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

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by