This project utilizes MATLAB to perform a comprehensive tensile test analysis on a brass specimen. By processing raw force and elongation data, the script automates the calculation of fundamental mechanical properties and provides high-fidelity visualizations of material behavior.
- Modulus of Elasticity (E): Determined via linear regression of the elastic region.
- Yield Strength: Calculated using the 0.2% Offset Method.
- Ultimate Tensile Strength (UTS)
- Fracture Stress.
- Toughness: Calculated through numerical integration (Area under the curve).
The file B5_4.csv contains raw tensile test measurements:
- Column 1: Applied force (N)
- Column 2: Elongation (mm)
The script converts this into engineering quantities:
- Strain = ΔL / L0
- Stress = F / A (reported in MPa and ksi)
Specimen parameters:
- Initial gauge length: 78 mm
- Cross-sectional area: 0.506 mm²
The following plots were generated to validate the material properties and visualize the specimen's transition from elastic to plastic deformation.
These plots represent the full material behavior from initial loading to fracture.
| Metric (MPa) | Metric (ksi) |
|---|---|
![]() |
![]() |
To derive specific properties, the script isolates the elastic region and applies standard engineering approximations.
| Linear Elastic Fit | 0.2% Offset Yield Method |
|---|---|
![]() |
![]() |
| Linear regression (polyfit) used to calculate Young's Modulus. | Graphical intersection used to determine the Yield Point. |
- Loads and processes tensile test data
- Computes stress and strain
- Creates stress–strain plots (MPa and ksi)
- Extracts elastic region and fits a linear regression
- Computes modulus of elasticity using polyfit
- Uses trapz to integrate toughness
- Applies the 0.2% offset method to estimate yield strength
- Prints a summary table including:
- Modulus of elasticity
- Yield strength
- UTS
- Fracture stress
- Toughness
Requirements:
- MATLAB
- 'Brass_Material_Analysis.m'
- 'B5_4.csv'
Steps:
- Open MATLAB
- Set Current Folder to this project
- Run: 'Brass_Material_Analysis'
- View generated figures
- Read mechanical property results printed in the Command Window
- MATLAB programming
- Mechanical engineering analysis
- Stress–strain interpretation
- Linear regression (polyfit)
- Numerical integration (trapz)
- 0.2% offset yield method
- Data visualization
- Engineering report preparation
- Automatically compute yield point intersection
- Support multiple specimens or materials
- Export summary tables and plots to a PDF report
- Convert script into reusable MATLAB functions



