# Can you please tell me what is the error ?

1 Ansicht (letzte 30 Tage)
Ahmed am 27 Dez. 2022
Beantwortet: Karim am 27 Dez. 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)];
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Karim am 27 Dez. 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 =
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by