MATLAB: How to plot a 3D graph which has data in the form of a 2D array with missing values

3d plotscell arrayscurve fittinginterpolation

My Data is the image attached but I am unsure how to interpolate it and then plot the graph, the curve fitting tool I think doesn't have the option to fit from an array.

Best Answer

The first row appears to be column headers, values at which the rows were created. The first column appears to be row headers, values at which the rows were created.
If the data is currently in the form of a cell array, with empty cells where the values are showing as blank, then grab https://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans and
mask = cellfun( @isempty, YourCell );
tempcell = YourCell;
tempcell(mask) = {NaN};
as_array = cell2mat(tempcell);
col_headers = as_array(1,2:end);
row_headers = as_array(2:end,1);
interpolated_data = inpaint_nans(as_array(2:end,2:end));
After that you can, for example,
surf(col_headers, row_headers, interpolated_data, 'edgecolor', 'none'); %notice row vs col order