Question: Problem 3: For this problem, you will need the P3.mat file on the metasite. Save the file in your current MATLAB folder. The P3.mat file

Problem 3: For this problem, you will need the P3.mat file on the metasite. Save the file in your current MATLAB folder. The P3.mat file contains two vectors: one for time, t, and another with power measurements, Power, measured in kW The energy consumption (kWh) is related to the integral of the power (kW) as follows: Energy 3600 Power dt Write a script file to do the following: Load the data file, P3.mat. d by lines. Estimate the energy consumption over time assuming Energy(0) 65 kWh by applying the Trapezoid Estimate for the integral to the power measurements. Use the figure command to open a new plot window. Plot the estimates for energy consumption over time as data points on the same plot. * Add an fprintf statement to display the final value for energy consumption. PASTE Results of fprintf statements here: PASTE PLOTS HERE: PASTE SCRIPT FILE HERE: Problem 3: For this problem, you will need the P3.mat file on the metasite. Save the file in your current MATLAB folder. The P3.mat file contains two vectors: one for time, t, and another with power measurements, Power, measured in kW The energy consumption (kWh) is related to the integral of the power (kW) as follows: Energy 3600 Power dt Write a script file to do the following: Load the data file, P3.mat. d by lines. Estimate the energy consumption over time assuming Energy(0) 65 kWh by applying the Trapezoid Estimate for the integral to the power measurements. Use the figure command to open a new plot window. Plot the estimates for energy consumption over time as data points on the same plot. * Add an fprintf statement to display the final value for energy consumption. PASTE Results of fprintf statements here: PASTE PLOTS HERE: PASTE SCRIPT FILE HERE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
