Borrar filtros
Borrar filtros

Error in solving an equation

1 visualización (últimos 30 días)
Shimon Katzman
Shimon Katzman el 21 de Nov. de 2019
Respondida: Priyanshu Mishra el 25 de Nov. de 2019
Hi everyone,
i would like to solve an equallity of two equations that the varaible is "c".
equation 1 - compression
equation 2 - tension
i would like to solve: tension=compression and find out "c"
Thank You
b=300; %mm
d=400; %mm
fc=40; %Mpa
Ecm=22*(fc/10)^0.3*10^3; %Mpa
Es=200000; %Mpa
epsc1=min(2.8/1000,0.7*fc^0.31/1000);
epscu=3.5/1000;
k=1.05*Ecm*epsc1/fc;
epscm=1.5/1000;
funC=@(epsc) (k*epsc/epsc1-(epsc/epsc1).^2)./(1+(k-2)*epsc/epsc1);
compression=@(c) b*fc*c/epscm*integral(funC,0,epscm)/1000;
tension=@(c) min(Es*(d-c)/c*epscm,fy);
solx=@(c) compression-tension;
x=solve(solx==0,c)

Respuestas (1)

Priyanshu Mishra
Priyanshu Mishra el 25 de Nov. de 2019
Hi Shimon,
For solving the function handles, I would suggest you use fsolve. Following is the code with few changes which might help you:
b=300; %mm
d=400; %mm
fc=40; %Mpa
Ecm=22*(fc/10)^0.3*10^3; %Mpa
Es=200000; %Mpa
epsc1=min(2.8/1000,0.7*fc^0.31/1000);
epscu=3.5/1000;
k=1.05*Ecm*epsc1/fc;
fy = 1;
epscm=1.5/1000;
funC=@(epsc) (k*epsc/epsc1-(epsc/epsc1).^2)./(1+(k-2)*epsc/epsc1);
compression=@(c) b*fc*c/epscm*integral(funC,0,epscm)/1000;
tension=@(c) min(Es*(d-c)/c*epscm,fy);
solx=@(c) b*fc*c/epscm*integral(funC,0,epscm)/1000 - min(Es*(d-c)/c*epscm,fy);
x=fsolve(solx,0)

Categorías

Más información sobre Partial Differential Equation Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by