Integration is not evaluated inside a function file

조회 수: 1 (최근 30일)
Wazy sky
Wazy sky 2019년 2월 18일
댓글: Star Strider 2019년 2월 18일
Hi
Could you please help with code below. It is not clear to me why the integration does not evaluated inside the function file. when I used script it is worked but I need to simplified the process by creating the func file to call it at different steps. The integration is identified for the variable (b) as presented in the code below:
function Fg=Fg(a)
syms b;
f_UHM=b/(-0.181363336688152-0.637631218835414*b)+2.64004309728928;
diff_f_UHM=diff(f_UHM)
a1=a-2.5;
FF=diff_f_UHM*asin(b/a1)
q1=int(FF,0,a1)
F=subs(f_UHM,a1)
Fg=F-(2/pi)*q1
end

채택된 답변

Star Strider
Star Strider 2019년 2월 18일
In the MATLAB Symbolic Math Toolbox, the correct syntax for your int call would be:
q1 = int(FF,b,0,a1)
However, I do not understand the endis call. Is this MATLAB, or is that a typographical error?
  댓글 수: 4
Wazy sky
Wazy sky 2019년 2월 18일
Great! So much appreaciated
Star Strider
Star Strider 2019년 2월 18일
As always, my pleasure!

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

추가 답변 (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