i want to solve this function and get the omega value,but i don't know how to use it ,please.
8 views (last 30 days)
Show older comments
clear all;clc;
for omega=1:100
syms omega a h g del eps
tb = 3;
lb = 10;
wb = 5;
E = 205e9;
rho = 7850;
I =((tb^3)*wb)/12;
pi =3.1416
A =tb*wb
K =0.833
G = E/2/(1+0.28)
a^4=(rho*A*omega^2)/(E*I)
h^4=(1-(rho*I*omega^2)/(K*A*G))*a^4
g^2=((a^4*I/A)+rho*omega^2/(K*G))
del=((h^4+(g^4)/4)^0.5+(g^2)/2)^0.5
eps=((h^4+(g^4)/4)^0.5-(g^2)/2)^0.5
F1 = ((del)^5*(sin((del)*lb))^2+(del)^2*(eps)^3*sin((del)*lb)*sinh((eps)*lb)-(eps)^2*(del)^3*sin((del)*lb)*sinh((eps)*lb)+(eps)^5*(sinh((eps)*lb))^2)...
-((del)^5*(cos((del)*lb))^2+(del)^2*(eps)^3*cos((del)*lb)*cosh((eps)*lb)-(eps)^2*(del)^3*cos((del)*lb)*cosh((eps)*lb)+(eps)^5*(cosh((eps)*lb))^2)
fsolve(F1,omega)
end
0 Comments
Answers (1)
Shubham Khatri
on 5 Jul 2021
Hello,
To my understanding, please use a different variable as an iterator to for loop. I have replaced omega with i. Also, I have created an empty matrix to store the values from fsolve.
In the fsolve fundtion, you need to add variable as a matlab function.
In my understanding, in this case, the solution entirely depends on the initial value (here i). I recommand you to please check the inital condition.
clear all;
clc;
empty=[];
for i=1:100
syms omega a h g del eps
tb= 3;
lb= 10;
wb= 5;
E= 205e9;
rho= 7850;
I=((tb^3)*wb)/12;
pi=3.414;
A=tb*wb;
K=0.833;
G= E/2/(1+0.28);
a=((rho*A*omega^2)/(E*I))^0.25;
h=((1-(rho*I*omega^2)/(K*A*G))*a^4)^0.25;
g=(((a^4*I/A)+rho*omega^2/(K*G)))^0.5;
del=((h^4+(g^4)/4)^0.5+(g^2)/2)^0.5;
eps=((h^4+(g^4)/4)^0.5-(g^2)/2)^0.5;
F1 = ((del)^5*(sin((del)*lb))^2+(del)^2*(eps)^3*sin((del)*lb)*sinh((eps)*lb)-(eps)^2*(del)^3*sin((del)*lb)*sinh((eps)*lb)+(eps)^5*(sinh((eps)*lb))^2)...
-((del)^5*(cos((del)*lb))^2+(del)^2*(eps)^3*cos((del)*lb)*cosh((eps)*lb)-(eps)^2*(del)^3*cos((del)*lb)*cosh((eps)*lb)+(eps)^5*(cosh((eps)*lb))^2);
empty(i)=fsolve(matlabFunction(F1),i);
end
empty
Hope it helps
0 Comments
See Also
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!