Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the data below plot the stats in matlab so the final figure looks similiar

ID: 3864066 • Letter: U

Question

Using the data below plot the stats in matlab so the final figure looks similiar to the figure provided

You are provided with data for renewable energy statistics in EU for the period of 2004 2014. File Data dat contains the following information (with no text in it): 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 362.8 348.0 351.3 347.9 364.1 366.6 408.0 340.4 366.6 403.1 406.5 Hydropower TWh) 58.9 70.5 82.3 104.4 119.5 133.1 149.4 179.7 206.0 236.8 253.2 Wind turbines TWh) 7.4 14.0 22.5 45.3 67.4 80.9 92.3 Solar TWh) 0.7 1.5 2.5 3.8 60.1 69.9 79.1 87.6 97.5 107.6 123.8 132.7 148.5 57.2 166.8 Biomass & renewable waste (TWh) Geothermal (TWh) 5.5 5.4 5.6 5.8 5.7 5.5 5.6 5.9 5.8 5.9 6.2 Electricity from renewables of 19 19.7 21.7 23.5 25.4 27.5 14.4 14.9 15.4 16.1 consumption) 17 You need to plot the statistics so that the final figure looks like the following (you may use different colors Hint: you should use stacked' style for the bar plot To show grid in only one direction read about set(gca,...) command

Explanation / Answer

MATLAB allows you create variables on the fly. To create a variable just use it on the left hand side of an equal sign. The following examples show how to assign values to three variables, x, y and z. It also shows the MATLAB response to the assignment statements.


Note that z exists only as a numerical value, not as the formula with which it was created.

Use the who command to list the currently active variables. For the preceding session this results in


To print the value of a variable that is already defined just type its name at the prompt.

The variables section describes how to work with MATLAB variables

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote