Programming Work Target: Write a MATLAB program to plot a surface diagram based on the provided data in excel. Data provided: Please read out the value of y and x in the first and second column. Plot:...

1 answer below »
Please follow the instruction in the pdf file. An excel file is provided with the data required for the work.


Programming Work Target: Write a MATLAB program to plot a surface diagram based on the provided data in excel. Data provided: Please read out the value of y and x in the first and second column. Plot: Please plot the surface plot with the provided x, y and z. You’ll need to generate two different surface diagrams, which will be (x, y, Z1) and (x, y, Z2). y,x,Z1,Z2 30,1,0.931,0.007 30,2,0.921,0.013 30,3,0.911,0.018 30,4,0.901,0.024 30,5,0.892,0.029 30,6,0.882,0.034 30,7,0.873,0.038 30,8,0.864,0.043 30,9,0.855,0.047 30,10,0.847,0.05 30,11,0.838,0.054 30,12,0.83,0.057 30,13,0.822,0.061 30,14,0.814,0.064 30,15,0.806,0.066 30,16,0.798,0.069 30,17,0.791,0.072 30,18,0.783,0.074 30,19,0.776,0.076 30,20,0.769,0.078 30,21,0.762,0.08 30,22,0.755,0.082 30,23,0.748,0.084 30,24,0.742,0.086 30,25,0.735,0.087 30,26,0.729,0.089 30,27,0.722,0.09 30,28,0.716,0.091 30,29,0.71,0.093 30,30,0.704,0.094 39.31,1,0.895,0.008 39.31,2,0.884,0.016 39.31,3,0.874,0.023 39.31,4,0.864,0.03 39.31,5,0.855,0.036 39.31,6,0.845,0.042 39.31,7,0.836,0.048 39.31,8,0.827,0.053 39.31,9,0.818,0.058 39.31,10,0.809,0.063 39.31,11,0.801,0.068 39.31,12,0.792,0.072 39.31,13,0.784,0.076 39.31,14,0.776,0.079 39.31,15,0.768,0.083 39.31,16,0.76,0.086 39.31,17,0.753,0.089 39.31,18,0.745,0.092 39.31,19,0.738,0.095 39.31,20,0.731,0.097 39.31,21,0.724,0.1 39.31,22,0.717,0.102 39.31,23,0.71,0.104 39.31,24,0.704,0.106 39.31,25,0.697,0.108 39.31,26,0.691,0.109 39.31,27,0.684,0.111 39.31,28,0.678,0.113 39.31,29,0.672,0.114 39.31,30,0.666,0.115 48.621,1,0.854,0.01 48.621,2,0.844,0.019 48.621,3,0.833,0.027 48.621,4,0.824,0.035 48.621,5,0.814,0.043 48.621,6,0.804,0.05 48.621,7,0.795,0.057 48.621,8,0.786,0.063 48.621,9,0.777,0.069 48.621,10,0.768,0.074 48.621,11,0.76,0.079 48.621,12,0.751,0.084 48.621,13,0.743,0.088 48.621,14,0.735,0.093 48.621,15,0.727,0.097 48.621,16,0.719,0.1 48.621,17,0.712,0.104 48.621,18,0.704,0.107 48.621,19,0.697,0.11 48.621,20,0.69,0.113 48.621,21,0.683,0.116 48.621,22,0.676,0.118 48.621,23,0.669,0.12 48.621,24,0.663,0.123 48.621,25,0.656,0.125 48.621,26,0.65,0.127 48.621,27,0.644,0.128 48.621,28,0.638,0.13 48.621,29,0.632,0.132 48.621,30,0.626,0.133 57.931,1,0.812,0.011 57.931,2,0.801,0.021 57.931,3,0.791,0.031 57.931,4,0.781,0.04 57.931,5,0.771,0.048 57.931,6,0.762,0.056 57.931,7,0.752,0.064 57.931,8,0.743,0.071 57.931,9,0.734,0.077 57.931,10,0.726,0.083 57.931,11,0.717,0.089 57.931,12,0.709,0.094 57.931,13,0.701,0.099 57.931,14,0.693,0.104 57.931,15,0.685,0.108 57.931,16,0.677,0.112 57.931,17,0.67,0.116 57.931,18,0.663,0.119 57.931,19,0.656,0.123 57.931,20,0.649,0.126 57.931,21,0.642,0.129 57.931,22,0.635,0.131 57.931,23,0.628,0.134 57.931,24,0.622,0.136 57.931,25,0.616,0.138 57.931,26,0.609,0.14 57.931,27,0.603,0.142 57.931,28,0.597,0.144 57.931,29,0.592,0.146 57.931,30,0.586,0.147 67.241,1,0.769,0.012 67.241,2,0.759,0.023 67.241,3,0.748,0.034 67.241,4,0.739,0.044 67.241,5,0.729,0.053 67.241,6,0.719,0.062 67.241,7,0.71,0.07 67.241,8,0.701,0.077 67.241,9,0.692,0.084 67.241,10,0.684,0.091 67.241,11,0.676,0.097 67.241,12,0.667,0.102 67.241,13,0.659,0.108 67.241,14,0.652,0.113 67.241,15,0.644,0.117 67.241,16,0.636,0.122 67.241,17,0.629,0.126 67.241,18,0.622,0.129 67.241,19,0.615,0.133 67.241,20,0.608,0.136 67.241,21,0.602,0.139 67.241,22,0.595,0.142 67.241,23,0.589,0.144 67.241,24,0.582,0.147 67.241,25,0.576,0.149 67.241,26,0.57,0.151 67.241,27,0.564,0.153 67.241,28,0.558,0.155 67.241,29,0.553,0.156 67.241,30,0.547,0.158 76.552,1,0.728,0.013 76.552,2,0.717,0.025 76.552,3,0.707,0.037 76.552,4,0.697,0.047 76.552,5,0.688,0.057 76.552,6,0.679,0.066 76.552,7,0.67,0.075 76.552,8,0.661,0.083 76.552,9,0.652,0.09 76.552,10,0.644,0.097 76.552,11,0.636,0.103 76.552,12,0.628,0.109 76.552,13,0.62,0.115 76.552,14,0.612,0.12 76.552,15,0.605,0.125 76.552,16,0.598,0.129 76.552,17,0.59,0.133 76.552,18,0.583,0.137 76.552,19,0.577,0.141 76.552,20,0.57,0.144 76.552,21,0.564,0.147 76.552,22,0.557,0.15 76.552,23,0.551,0.152 76.552,24,0.545,0.155 76.552,25,0.539,0.157 76.552,26,0.533,0.159 76.552,27,0.528,0.161 76.552,28,0.522,0.163 76.552,29,0.516,0.164 76.552,30,0.511,0.166 85.862,1,0.688,0.014 85.862,2,0.678,0.027 85.862,3,0.668,0.039 85.862,4,0.658,0.05 85.862,5,0.649,0.06 85.862,6,0.64,0.07 85.862,7,0.631,0.079 85.862,8,0.623,0.087 85.862,9,0.614,0.095 85.862,10,0.606,0.102 85.862,11,0.598,0.109 85.862,12,0.59,0.115 85.862,13,0.583,0.121 85.862,14,0.575,0.126 85.862,15,0.568,0.131 85.862,16,0.561,0.135 85.862,17,0.554,0.14 85.862,18,0.548,0.143 85.862,19,0.541,0.147 85.862,20,0.535,0.15 85.862,21,0.528,0.153 85.862,22,0.522,0.156 85.862,23,0.516,0.159 85.862,24,0.51,0.161 85.862,25,0.505,0.163 85.862,26,0.499,0.165 85.862,27,0.494,0.167 85.862,28,0.488,0.169 85.862,29,0.483,0.17 85.862,30,0.478,0.171 95.172,1,0.651,0.014 95.172,2,0.641,0.028 95.172,3,0.631,0.04 95.172,4,0.622,0.052 95.172,5,0.613,0.063 95.172,6,0.604,0.073 95.172,7,0.595,0.082 95.172,8,0.587,0.091 95.172,9,0.579,0.099 95.172,10,0.571,0.106 95.172,11,0.563,0.113 95.172,12,0.556,0.119 95.172,13,0.548,0.125 95.172,14,0.541,0.131 95.172,15,0.534,0.135 95.172,16,0.527,0.14 95.172,17,0.521,0.144 95.172,18,0.514,0.148 95.172,19,0.508,0.152 95.172,20,0.502,0.155 95.172,21,0.496,0.158 95.172,22,0.49,0.161 95.172,23,0.484,0.163 95.172,24,0.479,0.165 95.172,25,0.473,0.168 95.172,26,0.468,0.169 95.172,27,0.463,0.171 95.172,28,0.457,0.173 95.172,29,0.452,0.174 95.172,30,0.447,0.175 104.483,1,0.616,0.015 104.483,2,0.606,0.029 104.483,3,0.597,0.042 104.483,4,0.588,0.054 104.483,5,0.579,0.065 104.483,6,0.57,0.076 104.483,7,0.562,0.085 104.483,8,0.554,0.094 104.483,9,0.546,0.102 104.483,10,0.538,0.11 104.483,11,0.531,0.117 104.483,12,0.524,0.123 104.483,13,0.517,0.129 104.483,14,0.51,0.134 104.483,15,0.503,0.139 104.483,16,0.497,0.144 104.483,17,0.49,0.148 104.483,18,0.484,0.152 104.483,19,0.478,0.155 104.483,20,0.472,0.158 104.483,21,0.466,0.161 104.483,22,0.461,0.164 104.483,23,0.455,0.166 104.483,24,0.45,0.169 104.483,25,0.444,0.171 104.483,26,0.439,0.172 104.483,27,0.434,0.174 104.483,28,0.429,0.175 104.483,29,0.425,0.177 104.483,30,0.42,0.178 113.793,1,0.583,0.016 113.793,2,0.574,0.03 113.793,3,0.565,0.043 113.793,4,0.556,0.056 113.793,5,0.548,0.067 113.793,6,0.539,0.078 113.793,7,0.531,0.087 113.793
Answered Same DayJul 04, 2021

Answer To: Programming Work Target: Write a MATLAB program to plot a surface diagram based on the provided data...

Pankaj answered on Jul 04 2021
148 Votes
code.m
clc;clear all;close all;
a=xlsread('fit.csv');
z1=reshape(a(:,3),30,30);
z2=reshape(a(:,4
),30,30);
x=1:30;
y=[];
for i=1:30:900
y=[y; a(i,1)];
end
figure(1);
surf(x,y,z1); title('\bf Surface plot for Z1')
xlabel('\bf x'); ylabel('\bf y'); zlabel('\bf Z1'); colorbar
figure(2);
surf(x,y,z2); title('\bf Surface plot for Z2')
xlabel('\bf x'); ylabel('\bf y'); zlabel('\bf Z2');...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here