Please anyone help me to plot the graph(load against extension) from the raw data(excel) and calculate the area under the graph of it?

2 visualizaciones (últimos 30 días)
i want to plot the graph that i imported from the excel and calculate the area under the curve

Respuesta aceptada

Star Strider
Star Strider el 9 de Mayo de 2016
This should work:
[D,S] = xlsread('Al 1.csv');
Ext = D(:,2);
Load = D(:,3);
AUC = cumtrapz(Ext, Load); % Area Under Curve (Cumulative Integral)
figure(1)
plot(Ext, Load)
hold on
plot(Ext, AUC)
hold off
grid
xlabel('Extension (mm)')
ylabel('Load (kN)')
legend('Data', 'Cumulative Area Under Curve (kN\cdotmm)', 'Location','NW')
text(5, 25, sprintf('Total Area Under Curve = %.3f kN\\cdotmm', AUC(end)))
  12 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by