How to calculate the intersection point of lines on a loglog graph.

5 views (last 30 days)
I have the following code, and it outputs linear lines on a loglog graph, I've been trying to find a way to plot the xvalue of the intercept point of the elastic and plastic strain lines that are outputted, thanks for any help!

Accepted Answer

Torsten
Torsten on 4 Oct 2022
Edited: Torsten on 4 Oct 2022
eprime=0.59;
sigmaprime=277500;
%Constants for Manson Coffin Equation
b=-0.087;
c=-0.58;
%Young's Modulus
E=30*10^6;
%Creating equations to be plotted
%N is the number of reversals
N=logspace(1,6);
%Strain Equations
ElasticStrain=(sigmaprime/E)*(2*N).^b;
PlasticStrain=eprime*(2*N).^c;
idx = find(abs(ElasticStrain-PlasticStrain)==min(abs(ElasticStrain-PlasticStrain)));
xvalue= N(idx);
yvalue=ElasticStrain(idx);
TotalStrain=PlasticStrain+ElasticStrain;
%Generating a Log-Log graph, with all three strain equations.
loglog(N,ElasticStrain,N,PlasticStrain,N,TotalStrain,xvalue,yvalue,'*')
legend({'Elastic Strain','Plastic Strain','Total Strain'},'Location','northeast','Orientation','vertical')
title('Predicting Cycle Failure with Strain Life Analysis')
xlabel('Reversals to Failure,2N')
ylabel('Strain Amplitude')
%Calculating the Strain amplitude at 50000 Cycles
N=50000;
StrainAmplitude=eprime*(2*N).^c+(sigmaprime/E)*(2*N).^b
StrainAmplitude = 0.0041

More Answers (0)

Categories

Find more on Stress and Strain in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!