finding an area under a graph
Show older comments
I want to know the area under a graph.
%
opts = spreadsheetImportOptions("NumVariables", 5);
% Specify sheet and range
opts.Sheet = "Sheet1";
opts.DataRange = "AG4:AK206";
% Specify column names and types
opts.VariableNames = ["PressureMpa6", "PoreDiameter_nm_6", "CumulativePoreVolume_mL_g_6", "SmoothedDV_dlogDPoreVolume_mL_g_6", "x_OfTotalIntrusionVolume6"];
opts.VariableTypes = ["double", "double", "double", "double", "double"];
% Import the data
mean = readtable("/mean.xlsx", opts, "UseExcel", false)
% Clear temporary variables
clear opts2
figure;
semilogx(mean.PoreDiameter_nm_6(1:103),mean.CumulativePoreVolume_mL_g_6(1:103),XDataSource = 'mean.PoreDiameter_nm_6(1:103)',YDataSource = 'mean.CumulativePoreVolume_mL_g_6(1:103)');
linkdata on;
grid on
xlabel("PoreDiameter_nm_6(1:103)");
ylabel("CumulativePoreVolume_mL_g_6(1:103)");
title("CumulativePoreVolume_mL_g_6(1:103) vs PoreDiameter_nm_6(1:103)");
legend("show");
I would like to find the % of the area to the left of
on the x axis when compared to the total % of the total area under the graph.
on the x axis when compared to the total % of the total area under the graph.I hope that makes sense as a request.
Thanks in advance.
Alex
Accepted Answer
More Answers (0)
Categories
Find more on App Building 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!