i need to find the displacement for the given values
1 view (last 30 days)
Show older comments
clear all
syms p E v a b d A I G m U
p = 10
E = 3*10^4
v = 0.29
a = 39
b = 2*a
d = 1
A = pi/4
I = (pi/64)*d^2
G = E/(2*(1+v))
m = 5/6
U = p^2*a^2/(2*E*I)+p^2*a/(2*m*G*A)+p^2*b/(2*E*A)+p^2*b/2*E*A+p^2*a^3/2*G*I+p^2*a/2*G*m*A
disp = diff(U,p);
0 Comments
Answers (1)
Torsten
on 2 Dec 2022
Edited: Torsten
on 2 Dec 2022
syms p
E = 3*10^4;
v = 0.29;
a = 39;
b = 2*a;
d = 1;
A = pi/4;
I = (pi/64)*d^2;
G = E/(2*(1+v));
m = 5/6;
U = p^2*a^2/(2*E*I)+p^2*a/(2*m*G*A)+p^2*b/(2*E*A)+p^2*b/2*E*A+p^2*a^3/2*G*I+p^2*a/2*G*m*A;
dUdp = diff(U,p);
p0 = 10;
disp(double(subs(dUdp,p,p0)))
3 Comments
Torsten
on 2 Dec 2022
Edited: Torsten
on 2 Dec 2022
dUdp is a symbolic expression that depends on the symbolic variable p.
subs substitutes the value p0=10 for the symbolic variable p. The result is still symbolic.
double converts the symbolic value into a double value.
disp displays this value.
But is diff(U,p) really the displacement ? What is U ? What is p ?
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!