Summation of table imported from excel
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luis Eloy García-Mauriño Rey
el 26 de Abr. de 2020
Comentada: Luis Eloy García-Mauriño Rey
el 27 de Abr. de 2020
So I have a table which was imported to matlab from an excel document. The table has 3 columns: Crankshaft angle, Volume, Pressure. I need to do a summation following this formula

The table has 720 rows of data.
0 comentarios
Respuesta aceptada
Mrutyunjaya Hiremath
el 27 de Abr. de 2020
% Assuming xls data strored in variabl 'data'
% colum 1 is Angle, colum 2 is Volume, colum 3 is Pressure
Win = 0;
for i = 2:720
Win0 = ((data(i,3) + data(i-1,3)) * (data(i,2) - data(i-1,2)))/2;
Win = Win + Win0;
end
disp(Win)
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!