can you please help in how to calculate area of each loop in hysteria graph separately using Matlab
6 views (last 30 days)
Show older comments
Ali Ehsani yeganeh
on 16 Mar 2019
Commented: Star Strider
on 17 Mar 2019
6 Comments
Star Strider
on 16 Mar 2019
What are the 8 columns of the data (many of which are NaN)?
I do not understand what:
'MTS793|MPT|ENU|1|2|.|/|:|1|0|0|A'
are, and I doubt others here will either.
Accepted Answer
Star Strider
on 17 Mar 2019
I managed to identify the beginning and ending indices for each complete loop (at least as I define them) as the ‘comzx’ vector, so that may be the limit of my contribution here.
Try this:
[D,S] = xlsread('UHPC-FLEX-FATIGUE.xlsx');
zci = @(v) find(v(:).*circshift(v(:), [-1 0]) <= 0); % Returns Approximate Zero-Crossing Indices Of Argument Vector
loadidx = zci(D(:,2)); % Zero-Crossing Indicess Of ‘Load’
lt0idx = find(D(:,3) <= 0); % Indices For Deflection < 0
comzx = intersect(loadidx,lt0idx); % Start & End Indices For Each Complete Loop
loopareas = cumtrapz(flipud(D(:,1)), flipud(D(:,2)).^2+flipud(D(:,3)).^2); % Guess At Area Calculation
validareas = diff(flipud(loopareas(comzx))); % Guess At Individual Loop Areas
figure
plot3(D(:,2), D(:,3),D(:,1))
hold on
plot3(D(comzx,2), D(comzx,3), D(comzx,1), '.r')
hold off
grid
xlabel('Load')
ylabel('Deflection')
legend('Data','Loop Start-End')
You will likely have to decide for yourself how to calculate the areas. (I integrated the sum of the squares of ‘Load’ and ‘Deflection’ with respect to time.) Flipping the vectors upside-down (the flipud calls) is necessary because integrating them without first doing results in a cumtrapz output vector that are uniformly NaN.
I have no idea if the area calculations are correct. However this is your research, so I leave the correct calculation to you. You can likely find a reference for that in the literature.
2 Comments
Star Strider
on 17 Mar 2019
My pleasure.
If my Answer helps you solve your problem, please Accept it!
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!