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

Energy.xlsx is available ; the three sheets contain different data sets. The fir

ID: 3691773 • Letter: E

Question

Energy.xlsx is available ; the three sheets contain different data sets. The first sheet contains energy data pertaining to a constant a-axis while varying the b-axis and gamma; the second sheet contains energy data pertaining to a constant b-axis while varying the a-axis and gamma; and the third sheet contains energy data pertaining to a constant gamma while varying the a- and b-axes. Create a script that imports the data from Excel into MATLAB. Plot three 3D graphs (one for the constant a-axis, one for the constant b-axis, and one for constant gamma). Also in the script, determine the minimum energy in each sheet and the parameters associated with it (a- and b-axes lengths and gamma); then determine the overall energy minimum for all of the data and the associated parameters. Your script should output 7 things: 3 graphs and 4 messages (one message for each of the required energy minima). Your graphs should be labeled and have color bars associated with them (include these in your homework).

12 13 17 18 19 20 21 12 12 12 12 12 12 12 12 12 12 12 13 14 15 16 17 18 19 20 21 21 34 35 36 37 38 39 40 15 16 17 23 24 25 26 27 28 29 30 10 10 12 1.3 14 15 16 10 6 12 13 14 15 16 6 2.3 24 25 26 10 10 12 13 19 20 21 12 13 13 10 10 sheet 1 sheet2 sheet3

Explanation / Answer

To import the data from the excel sheet to the MATLAB program, we generally use the
function xlsread().
Below is the code that will actually import the data first.

A = xlsread('myfile.xls','Sheet 1','A:A'); % this will read entire A column.
B = xlsread('myfile.xls','Sheet 2','B:B'); % this will read entire A column.
C = xlsread('myfile.xls','Sheet 3','C:C'); %This will read entire C column.

x = A(:,1); % this will read the first column of the first sheet
y = A(:,2); % this will read the second column of the first sheet
z = A(:,3); % this will read the third column of the first sheet
title('Graph for the first sheet');
plot3(x,y,z); % This performs the 3-D plot of the graph

% Similarly we set the graph for the remaining sheets

x = B(:,1); % this will read the first column of the second sheet
y = B(:,2); % this will read the second column of the second sheet
z = B(:,3); % this will read the third column of the second sheet
title('Graph for the Second sheet');
plot3(x,y,z); % This performs the 3-D plot of the graph.

% Plotting graph for the third sheet.

x = C(:,1); % this will read the first column of the third sheet
y = C(:,2); % this will read the second column of the third sheet
z = C(:,3); % this will read the third column of the third sheet
title('Graph for the third sheet');
plot3(x,y,z); % This performs the 3-D plot of the graph.

This is the script for fetching the data from the excel sheet and plotting of the 3-D
graph.
Do mention the formula for calculating the mimimum and the maximum energy, so that it could be embedded
with this code.