フィルターのクリア

Issue with Matlab symbolic int

2 ビュー (過去 30 日間)
Nathan Lang
Nathan Lang 2023 年 11 月 13 日
コメント済み: Nathan Lang 2023 年 11 月 13 日
I am modeling a load curve distribution on a cantilever beam in order to get a maximum deflection value and for whatever reason, the moment equation which should just be the boundary condition + the integral of the shear function is evaluating at a higher number at the connection point than it should. I have found a way to account for this but now do not know the validity of the integration in general. I am wondering how I may have messed up my own code to get the erroneous result.
code attached here
syms y
load=vpa(0.5*(2.97952*(2.56-2/15*1.54*y)+sqrt((16*4/(3*pi))^2*(1-y^2/(15/2)^2))))
%load curve using up as negative from convention
L=7.5; %length of beam in ft
totalf=int(load, [0, 7.5]); %total force as a check
yloc=int(load*y, [0, 7.5])/totalf; %find the centroid of load
V=-40+int(load); %shear as function of span using convention, V(0)=-40 is the first boundary condition
shearcheck=int(V);
y=0;
shearcorrection=subs(shearcheck); %factor that accounts for weird evaluation of int(V)
M=totalf*yloc+int(V)-shearcorrection; %moment as a function of span using convention, M(0)=127 is second bc
momentcheck=int(M);
matroot=subs(momentcheck);
EItheta=int(M); %first integral of the deflection eqn
EIdeflection=int(EItheta); %deflection
EImaxdeflection=int(EItheta,[0 7.5]); %deflection

採用された回答

Walter Roberson
Walter Roberson 2023 年 11 月 13 日
Use definite integrals rather than indefinite integrals.
For example matlab tends to take a term that would be typically be written as sin(x)^2, and return cos(x)^2 instead and in the indefinite integral that is valid because the two different by a constant.
  1 件のコメント
Nathan Lang
Nathan Lang 2023 年 11 月 13 日
Okay thank you for the suggestion I will try that.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by