From 5b1db52b2958be0a38a9bd3782ae1200b1b741a0 Mon Sep 17 00:00:00 2001 From: Travis E Braisted Date: Wed, 13 Sep 2017 18:33:41 -0400 Subject: [PATCH] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2304ff9..b3efe5c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ stdev of A_66 = 9.07 #Problem 4 ```MATLAB data=dlmread('US_energy_by_sector.csv',',',2,0); -figure(1) +h=figure(); plot(data(:,1),data(:,3),data(:,1),data(:,9)); set(0, 'defaultAxesFontSize', 16) set(0,'defaultTextFontSize',14) @@ -31,19 +31,19 @@ xlabel('Time (years)') ylabel('Total Energy Consumed (trillions of BTUs)') legend('Residential','Transportation','Location','northwest') title('US Energy Consumption from 1949 to 2016') +saveas(h,'figure_01.png') - -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) +h=figure(); plot(data(:,1),rescum,data(:,1),transcum) - set(gcf, 'Position', [500, 200, 1000, 800]) xlabel('Time (years)') ylabel('Total Energy Consumed (quintillions of BTUs)') legend('Residential','Transportation','Location','northwest') title('Cumulative US Energy Consumption from 1949 to 2016') +saveas(h,'figure_02.png') ``` #Problem 5 (Velocity and Acceleration)