Unable to plot graphs
Show older comments
%S-N Graph Plot for Fatigue Testing for the three specimens
%Defined Parameters
disp('The dimensions and parameters of the Test:');
disp('The diameter for each of the specimen, D=5mm');
disp('The distance from the end of the specimen and the minimum diameter of the specimen, L = 78mm');
D = 5; L = 78; N=5;
%The weight that are loaded (kg) are then later converted to Newton (N)
disp('The weight in Newton (N) applied on each of the specimen');
P = [7.580811,9.02244,10.38561,13.20022,14.63204];
disp('Using the Defined Parameters for all the value of (P), the stress is calculated using the formula of stress');
S = [240.8874,286.6965,330.0126,419.4494,464.9469];
%Determining the Number of Cycles done by the three Specimens
disp('The number of cycles done with stress applied and number of trials for Mild Steel');
for f = 1:N
Ms(f)=input(['Load Number:'num2str(f)','Cycles done:']);
f=f+1;
end
disp('The number of cycles done with stress applied of trials for Aluminium');
for d = 1:N
Ali(d)=input(['Load Number:'num2str(d)',Cycles Done:']);
d = d+1;
end
disp('The number of cycles done with stress applied and number of trials for Brass');
for g = 1:N-1
Brs(g)=input(['Load Number:'num2str(g)',Cycles Done: ']);
g = g+1;
end
%Arranging allt he values
disp('The Number Of Cycles taken by Aluminium');
disp(Ali);
disp('The Number Of Cycles taken by Mild Steel');
disp(Ms);
disp('The Number of Cycles taken by Brass');
disp(Brs);
%Plotting the S-N Curve for the three Specimens
%For Aluminium
figure
plot (Ali,S)
title('S-N graph (ALuminium)')
xlabel('Number of Cycles (N)')
ylabel('Stress Applied (N/mm^2)')
Accepted Answer
More Answers (0)
Categories
Find more on App Building 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!