Can you please tell me what is the error ?

4 views (last 30 days)
Ahmed
Ahmed on 27 Dec 2022
Answered: Karim on 27 Dec 2022
clc
clear all
E=70*10^6;
v=0.3;
p=50*10^3;
h=0.01;
a=0.5;
b=0.5;
syms x y
B=-h*[6*x*(b-2*y)/(a^(3)*b) 0 (a-6*x)*(b-2*y)/(2*a^2*b) -6*x(b-2*y)/(a^3*b) 0 -(a+6*x)*(b-2*y)/(2*a^2*b) -6*x*(b+2*y)/(a^3*b) 0 -(a+6*x)*(b+2*y)/(2*a^2*b) 6*x*(b+2*y)/(a^3*b) 0 (a-6*x)*(b+2*y)/(2*a^2*b);6*(a-2*x)*y/(a*b^3) -(a-2*x)*(b-6*y)/(2*a*b^2) 0 6*(a+2*x)*y/(a*b^3) -(a+2*x)*(b-2*y)/(2*a*b^2) 0 -6*(a+2*x)*y/(a*b^3) (a+2*x)*(b+6*y)/(2*a*b^2) 0 -6*(a-2*x)*y/(a*b^3) (a-2*x)*(b+6*y)/(2*a*b^2) 0;4*(-3*b^2*x^2+a^2*(b^2-3*y^2))/(a^3*b^3) (b-2*y)*(b+6*y)/(2*a*b^2) -(a-2*x)*(a+6*x)/(2*a^2*b) (12*b^2*x^2-4*a^2*(b^2-3*y^2))/(a^3*b^3) -(b-2*y)*(b+6*y)/(2*a*b^2) -(a-6*x)*(a+2*x)/(2*a^2*b) 4*(-3*b^2*x^2+a^2*(b^2-3*y^2))/(a^3*b^3) -(b-6*y)*(b+2*y)/(2*a*b^2) (a-6*x)*(a+2*x)/(2*a^2*b) (12*b^2*x^2-4*a^2*(b^2-3*y^2))/(a^3*b^3) (b-6*y)*(b+2*y)/(2*a*b^2) (a-2*x)*(a+6*x)/(2*a^2*b)];

Accepted Answer

Karim
Karim on 27 Dec 2022
you forgot a * in -6*x(b-2*y)/(a^3*b) this should be -6*x*(b-2*y)/(a^3*b)
see below
E=70*10^6;
v=0.3;
p=50*10^3;
h=0.01;
a=0.5;
b=0.5;
syms x y
B=-h*[6*x*(b-2*y)/(a^(3)*b) 0 (a-6*x)*(b-2*y)/(2*a^2*b) -6*x*(b-2*y)/(a^3*b) 0 -(a+6*x)*(b-2*y)/(2*a^2*b) -6*x*(b+2*y)/(a^3*b) 0 -(a+6*x)*(b+2*y)/(2*a^2*b) 6*x*(b+2*y)/(a^3*b) 0 (a-6*x)*(b+2*y)/(2*a^2*b);
6*(a-2*x)*y/(a*b^3) -(a-2*x)*(b-6*y)/(2*a*b^2) 0 6*(a+2*x)*y/(a*b^3) -(a+2*x)*(b-2*y)/(2*a*b^2) 0 -6*(a+2*x)*y/(a*b^3) (a+2*x)*(b+6*y)/(2*a*b^2) 0 -6*(a-2*x)*y/(a*b^3) (a-2*x)*(b+6*y)/(2*a*b^2) 0;
4*(-3*b^2*x^2+a^2*(b^2-3*y^2))/(a^3*b^3) (b-2*y)*(b+6*y)/(2*a*b^2) -(a-2*x)*(a+6*x)/(2*a^2*b) (12*b^2*x^2-4*a^2*(b^2-3*y^2))/(a^3*b^3) -(b-2*y)*(b+6*y)/(2*a*b^2) -(a-6*x)*(a+2*x)/(2*a^2*b) 4*(-3*b^2*x^2+a^2*(b^2-3*y^2))/(a^3*b^3) -(b-6*y)*(b+2*y)/(2*a*b^2) (a-6*x)*(a+2*x)/(2*a^2*b) (12*b^2*x^2-4*a^2*(b^2-3*y^2))/(a^3*b^3) (b-6*y)*(b+2*y)/(2*a*b^2) (a-2*x)*(a+6*x)/(2*a^2*b)]
B = 

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!