how can i solve this error

조회 수: 1 (최근 30일)
sajjad barzigar
sajjad barzigar 2020년 8월 2일
댓글: sajjad barzigar 2020년 8월 4일
i writed this code and i want to integral the sum of Egb and Egs but i get this error
Error using integral (line 82)
First input argument must be a function handle.
and this error
Error in figure (line 28)
Eg=integral(Egs+Egb,0,TETAmax,TETA);
this is the code
clc
clear all
syms TETA
S0=613e9;
Sp=3.7e9;
Rin=27.5e-3;
Rout=31.5e-3;
h=15e-3;
for t=0.001:0.0001:0.0014;
TETAmax=-3.661*((h/t)^-1.14)+2.589;
DELTAmax=h-t-(h/(2*TETAmax));
R=Rin+(t/2);
Egb=pi*S0*(t^2)*((TETA*4*R)+h-(h*cos(TETA)))/((3^(0.5))*(TETA))
Egs=pi*S0*(h^2)*t*(TETA*sin(TETA)+cos(TETA)-1)/(2*(TETA)^2)
Eg=integral(Egs+Egb,0,TETAmax,TETA);
end
what is wrong?thank you for your help.

채택된 답변

Walter Roberson
Walter Roberson 2020년 8월 2일
integral() is reserved for numeric integration. You are doing integration of symbolic expression. You need to use int() or vpaintegral() for that.
  댓글 수: 12
sajjad barzigar
sajjad barzigar 2020년 8월 4일
normaly between 12 to 20 i think.but they didnt mention any kind of valid range for the answer.
sajjad barzigar
sajjad barzigar 2020년 8월 4일
any way thank you for every thing :)

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

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