I am unable run this code , can i know where is wrong
1 view (last 30 days)
Show older comments
function [theta_p, epsilon_max, epsilon_min, Y_max_in] = P_7_C6(-260,-60,480,0.334)
%
% Define average normal strain
epsilon_avg = ((epsilon_x + epsilon_y)/2);
%
% Calculate, Radius of the Mohr circle
R = sqrt(((((epsilon_x) - (epsilon_y))/2)^2) + ((Y_xy/2)^2) );
%
% Calculate maximum principal strain
epsilon_max = epsilon_avg + R;
%
% Calculate minimum principal strain
epsilon_min = epsilon_avg - R;
%
% Locate the position of the principal plane
theta_p = (atand((Y_xy)/ ((epsilon_x) - (epsilon_y) ) ) )/2;
%
% Calculate maximum in-plane shear strain
Y_max_in = 2*R;
%
% Define third principal strain along an axis perpendicular
% to the plane of stress.
epsilon_c = -(nu/ (1-nu) )* ((epsilon_max) + (epsilon_min));
%
% Calculate maximum shear strain
if (epsilon_max >= epsilon_min && epsilon_min >= epsilon_c)
Y_max_out = (epsilon_max) - (epsilon_c);
elseif (epsilon_max >= epsilon_c && epsilon_c >= epsilon_min)
Y_max_out = (epsilon_max) - (epsilon_min);
elseif (epsilon_c >= epsilon_max && epsilon_max >= epsilon_min)
Y_max_out = (epsilon_c) - (epsilon_min);
end
%
%Print the output values
fprintf([ '\nAngle between xy axes and principal axes ',...
'(+ Counter-clockwise) :' ])
fprintf([ * \n-------------------------------------------',...
'-------------------------\n' ])
fprintf( 'Principal plane is at %f Degrees \n' , theta_p)
fprintf (['epsilon_a = %d micro meter\nepsilon_b = %d micro ',...
'meter\n' ], epsilon_max, epsilon_min)
fprintf( 'epsilon_c = %5.2f micro meter \n', epsilon_c)
fprintf([ '\n--------------------------------------------- ,...
'---------------------\n' ])
fprintf(['Y_max(in-plane) = %5.2f micro radians',...
'\nY_max(out-of-plane) = %5.2f micro radians \n' ], Y_max_in, Y_max_out)
end
0 Comments
Answers (0)
See Also
Categories
Find more on Digital Filter Analysis 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!