diff --git a/US_energy_by_sector_code.m b/US_energy_by_sector_code.m index 2fb6834..5578920 100644 --- a/US_energy_by_sector_code.m +++ b/US_energy_by_sector_code.m @@ -11,9 +11,9 @@ legend('Residential','Transportation','Location','northwest') title('US Energy Consumption from 1949 to 2016') -rescum=cumsum(data(:,3))./1000000;%cumulative sum of residential energy +rescum=cumsum(data(:,3))./1000000;%cumulative sum of residential energy %consumption in quintillions -transcum=cumsum(data(:,9))./1000000;%cumulative sum of transportational +transcum=cumsum(data(:,9))./1000000;%cumulative sum of transportational %energy consumption in quintillions figure(2) plot(data(:,1),rescum,data(:,1),transcum)