Why doesnt matlab simplify the calculations.How could i improve my code?
이전 댓글 표시
%In determining the load distribution in axial thrust bearings under an eccentric load,the following integral must be evaluated:
e=0.6;
m=0||1;
syms x
c=1.1;
a=(cos(1-2.*e));
na=-1.*(cos(1-2.*e));
eqn=@(x) (([1+(-1+acos(x))/(2.*e)].^(c)).*(cos(m.*x)));
Im=(1/(2*pi))*(int(eqn,x,na,a));
pretty(Im)
답변 (2개)
Star Strider
2017년 3월 24일
In your problem, there may not be an analytical expression for the integral. If you want the numerical value, use the vpa function:
e=0.6;
m=0.1;
syms x
c=1.1;
a=(cos(1-2.*e));
na=-1.*(cos(1-2.*e));
eqn=@(x) (([1+(-1+acos(x))/(2.*e)].^(c)).*(cos(m.*x)));
Im=(1/(2*pi))*(int(eqn,x,na,a));
Im = simplify(Im, 'Steps',10); % Symbolic Simplification
pretty(Im)
Im_val = vpa(Im) % Numeric Value
Im_val =
0.48167541183902032831734712665393
I don’t know what you want for ‘m’. What you posted for it doesn’t make sense. Change it in my code to whatever it needs to be.
댓글 수: 3
Shane Mcfarlane
2017년 3월 25일
Walter Roberson
2017년 3월 25일
To reach that integral with those equations, m would have to be about 1.9242
Walter Roberson
2017년 3월 25일
Alternately, with m = 1, the value 0.2416 would be reached with e approximately 0.96
Walter Roberson
2017년 3월 25일
0 개 추천
int() is not documented as accepting a function handle, only a symbolic expression or symbolic function.
카테고리
도움말 센터 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!