I need help in creating a stress-load diagram of three different materials
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I need help in creating a stress-load diagram of three different materials
Material 1 = Mild Steel
Material 2 = Brass
Material 3 = Aluminium
Please help me to find the code, i need have S-N curve graph.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1065705/image.jpeg)
0 comentarios
Respuestas (1)
Aditya
el 6 de Oct. de 2023
Hi Muhammad,
From your query, I understand that you want to plot the S-N curve for the given materials. For this you can utilize the ‘plot’ function available in MATLAB. I have shared the sample code snippet below, which demonstrates the creation of S-N curve for Aluminium using random data.
% Data for S-N curve (stress vs. number of load cycles to failure)
% Format: [stress1, N1; stress2, N2; ...]
aluminium_data = [50, 2000; 100, 1000; 150, 500; 200, 200];
% Plot S-N curve for Aluminium
plot(aluminium_data(:, 2), aluminium_data(:, 1), 'b', 'LineWidth', 2);
% Set plot labels and title
xlabel('Number of Load Cycles to Failure (N)');
ylabel('Stress (S)');
title('Stress-Load (S-N) Diagram');
If you want to plot multiple curves into single graph, you can utilize ‘hold on’ and ‘hold off’ commands.
For better understanding of how to use ‘plot’ function, please refer to this MATLAB documentation:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Stress and Strain en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!