curve fitting area calculation?

2 次查看(过去 30 天)
Davide Cerra
Davide Cerra 2018-12-10
how can i calculate the 2 separate areas of the graph?
a= xlsread('Rosborg BEM.xlsx.','Sheet1','A2:A366');
figure
%%allyear
subplot(2,1,1);
plot(a);
title('System Loads');
xlabel('Time[Days]');
ylabel('[kWh]');
xlim([0,365]);
grid on;
%%fitting
[xData, yData] = prepareCurveData( [], a );
ft = fittype( 'poly8' );
[fitresult, gof] = fit( xData, yData, ft, 'Normalize', 'on' );
subplot(2,1,2);
plot( fitresult, xData, yData );
xlim([0,365]);
legend off
gof
Untitled.png

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fit Postprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by