I am trying to solve the following code.
clc
clear
% variables
E= 29000;
t = 2;
v = 0.3;
syms a;
syms b;
% finding B
B = [ (-b-y)/(4ab) 0 (b-y)/(4ab) 0 (b+y)/(4ab) 0 (-b+y)/(4ab) 0;
0 (-a-x)/(4ab) 0 (-a+x)/(4ab) 0 (a+x)/(4ab) 0 (a-x)/(4ab);
(-a-x)/(4ab) (-b-y)/(4ab) (-a+x)/(4ab) (b-y)/(4ab) (a+x)/(4ab) (b+y)/(4ab) (a-x)/(4ab) (-b+y)/(4ab)]
% E
Em= [ 31868.132 9560.44 0;
9560.44 35868.132 0;
0 0 1153.8]
% Getting K
C = transpose(B)
fun=@(x,y)C*Em*B*t;
k = integral2(fun,-a,a,-b,b)
Attached below is a picture of the equation.
Equation:
I'm trying to solve this integral equation using the matrices in the code.

Réponses (1)

Walter Roberson
Walter Roberson le 31 Mar 2019

0 votes

Q = @(v) sym(v,'r');
E= Q(29000);
t = Q(2);
v = Q(0.3);
syms a b x y
% finding B
B = [ (-b-y)/(4*a*b) 0 (b-y)/(4*a*b) 0 (b+y)/(4*a*b) 0 (-b+y)/(4*a*b) 0;
0 (-a-x)/(4*a*b) 0 (-a+x)/(4*a*b) 0 (a+x)/(4*a*b) 0 (a-x)/(4*a*b);
(-a-x)/(4*a*b) (-b-y)/(4*a*b) (-a+x)/(4*a*b) (b-y)/(4*a*b) (a+x)/(4*a*b) (b+y)/(4*a*b) (a-x)/(4*a*b) (-b+y)/(4*a*b)];
% E
Em = Q([ 31868.132 9560.44 0;
9560.44 35868.132 0;
0 0 1153.8]);
% Getting K
C = transpose(B);
fun = C*Em*B*t;
k = int(int(fun,x,-a,a),y,-b,b);
The results alternate between numeric constants, versus expressions of the form constant*a/b + constant*b/a

1 commentaire

Rubinjeet Sangha
Rubinjeet Sangha le 31 Mar 2019
I'm not able to get this correction to run.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by