Trying to find the slope from the graph regenerate in MATLAB and then find a 0.2% offset

1 view (last 30 days)
The picture below was generate from the following script. The data comes from a computer regenerate data.
clc;
clear all;
Information6 = xlsread('/SteelTest1.is_tens_RawData/Specimen_RawData_1.xlsx', 'A:E');
length_All = length(Information6);
Information6_modifiy = Information6(3:length_All,:);
figure
plot(Information6_modifiy(:,5), Information6_modifiy(:,4), '-.g', 'LineWidth', 2);
hold all
title('Steel', 'FontSize', 25)
xlabel('Strain (mm/mm)', 'FontSize', 20), ylabel ('Stress (MPa)','FontSize', 20);
legend({'Steel Test 1', 'Steel Test 2', 'Steel Test 3'}, 'FontSize', 15, 'Location', 'Northwest');
set(gca, 'LineWidth', 1,'FontSize', 15,'XminorTick','on','YMinorTick','on');
axis square;
Now how would you go about finding the slope and then finding a 0.2% offset. I attempted different options but none of them close to finding the slope of this graph and drawing a 0.2% offset based on the slope
Thanks for your help,
A real novice with MatLab
  2 Comments
Walter Roberson
Walter Roberson on 6 Oct 2015
The slope of what part of the graph?
0.2% offset relative to what? Are you asking for the 99.8% confidence interval?
CR
CR on 7 Oct 2015
Sorry, I am trying to find a slope on the line left side. It is starting at about (0,0) and going up to about (0.025, 800). Basically, I need to find the modulus of elasticity or Young's modulus of this particular metal. I can do the calculation but I simply don't know how to program Matlab to find the slope and draw the 0.2% offset yield or young's modulus.
Thank you.

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 7 Oct 2015
I don’t have your data, but I would calculate it as:
x = [0.002; 0.022]; % From Plot
y = [10; 720]; % From Plot
C = [ones(size(x)) x]\y;
Slope = C(2)
Slope =
35.5000e+003

Categories

Find more on Vibration Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!