I get "empty syms" solution when solving inequalities
Show older comments
I am trying to solve the following inequality. I have done similar inequality and they all worked out fine, could anyone tell me what is wrong with my setup?
syms s
ox = 2*s;
oy = -3*s;
txy = 4*s;
oxy = [ox; oy; txy];
%ultimate stresses, 1 is fiber direction 2 is matrix direction
ut1stress = 1500;
uc1stress = -1500;
ut2stress = 40;
uc2stress = -246;
ut12 = 68;
%layup angle
theta = deg2rad(60); %angle from x to 1, input degree value ,change to rad
%o1 = ox * cos(theta)^2 + oy * sin(theta)^2 + 2 * txy * sin(theta) * cos (theta)
%o2 = ox * sin(theta)^2 + oy * cos(theta)^2 - 2 * txy * sin(theta) * cos (theta)
c = cos(theta);
s = sin(theta);
%T is global to local stress
T = [c^2 s^2 2*s*c; s^2 c^2 -2*s*c; -1*s*c s*c c^2 - s^2];
o12 = T*oxy;
o1 = o12(1, 1);
o2 = o12(2, 1);
t12 = o12(3, 1);
%tsaihill needs to be less than 1
tsaihill = (o1/ut1stress)^2-((o1*o2)/(ut1stress^2))+(o2/ut2stress)^2+(t12/ut12)^2;
%check how to get less than 1
checkvalue = 1;
eqn1 = tsaihill < checkvalue;
solvetsaihill = solve(eqn1, s,'ReturnConditions',true)
solvetsaihill =
struct with fields:
s: [0×1 sym]
parameters: [1×0 sym]
conditions: [0×1 sym]
Accepted Answer
More Answers (0)
Categories
Find more on Equation Solving 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!