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)
Mostrar comentarios más antiguos
Matzulk
el 9 de Mayo de 2016
Comentada: Star Strider
el 11 de Mayo de 2016
i want to plot the graph that i imported from the excel and calculate the area under the curve
0 comentarios
Respuesta aceptada
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
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!