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

(In Matlab) 2. Dowload the Excel file data.xlsx from the course website. There a

ID: 3878647 • Letter: #

Question

(In Matlab)

2. Dowload the Excel file data.xlsx from the course website. There are 3 sheets i tlie file: x data, y data and z data. Write a script that imports these three sets of data into Matlab (using xlsread), and then makes a 3-D mesh plot of z plotted against r and y. Your resulting plot should look like this: 120 100 20 10 10 17 37 65 82 26 2 2.414214 5,414214 10.41421 17.41421 26.41421 37,41421 50.41421 65,41421 82.41421 101.4142 3 2.132051 5.732051 10./3205 11.13205 26.73205 31.13205 50.13205 65.13205 2.1320 101.7321 27 5 3.236068 6.236068 11.23607 18.23607 27.23607 38.23607 51.23607 66.23607 83.23607 102.2361 6 3.44949 6.44949 11.44949 18.44949 27.44949 38.44949 51.44949 66.44949 3.44949 102.4495 7 3.645751 6.645751 11.64575 18.64575 27.64575 38.64575 51.64575 66.64575 3.64575 102.6458 8 3.828427 6.828427 11.82843 18.82843 27.82843 38,82843 51.82843 66,82843 83.82843 102.8284 28 10 4,1622787.162278 12.1622819.16228 28.16228 39,16228 52.16228 67,16228 84.16228 103.1623 101 3 18 38 51 65 83 102 4 7 12 19 39 52 67 84 103

Explanation / Answer

Reading data from excel file. The data is to be read from 3 different sheets. 2 parameters will be passed to the xlsread function, 1st parameter is filename and the 2nd parameter is sheet name.

Filename = ‘data.xlsx’;

X = xlsread(filename, “x data”)

Y = xlsread(filename, “y data”)

Z = xlsread(filename, “x data”)

% Creating 3-D mesh with the imported data. Mesh() function is used to create a mesh 3-D plot %

mesh(X,Y,Z)