I'm trying to solve a symbolic system of equations in MATLAB, but it keeps giving me zero for the variables I'm solving for. I know this isn't the answer since I worked the problem out by hand. Is there a way to use the solve function to do this?
% Equillateral Strain Rosette Problem% angle values (A = 0, B = 120; C =60; seems to be standard for a 60 degree% equilateral triangle)A = 0;B = 120;C = 60;% Given AnglesThetaA = deg2rad(A); %radians for A, it always seems to start at 0ThetaB = deg2rad(B); %in an equillateral triangle seems to be 180-interior angleThetaC = deg2rad(C); %seems to be just interior anglesyms strainx strainy strainxy strainA strainB strainCstrainA = (strainx+strainy)/2 + (strainx-strainy)/2*cos(2*ThetaA) + strainxy*sin(2*ThetaA);strainB = (strainx+strainy)/2 + (strainx-strainy)/2*cos(2*ThetaB) + strainxy*sin(2*ThetaB);strainC = (strainx+strainy)/2 + (strainx-strainy)/2*cos(2*ThetaC) + strainxy*sin(2*ThetaC);eqns = [strainA, strainB, strainC];vars = [strainx, strainy, strainxy];[strainx, strainy, strainxy] = solve(eqns,vars); %Need to solve in terms of strainA strainB and strainC
Best Answer