Borrar filtros
Borrar filtros

Issue with Matlab symbolic int

2 visualizaciones (últimos 30 días)
Nathan Lang
Nathan Lang el 13 de Nov. de 2023
Comentada: Nathan Lang el 13 de Nov. de 2023
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Nov. de 2023
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 comentario
Nathan Lang
Nathan Lang el 13 de Nov. de 2023
Okay thank you for the suggestion I will try that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by