I need a picture of a graph similar to the one I posted
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clear all
clc
T = readtable('data1.xlsx') ;
T = table2array(T) ;
x = T(1,2:end); %
y = T(2:end,1); %
Z = T(2:end,2:end); % use fillmissing to fill NaNs
[X,Y] = meshgrid(x,y) ;
[xq,yq] = meshgrid(2:0.1:10); % grid 0.1
Zq = interp2(x,y,Z,xq,yq,'spline'); % spline
figure
AA = surf(xq,yq,Zq);
title('(spline,cubic,makima) Interpolation Using Finer Grid');
I need a graph that changes this graph to the following shape, regardless of the exact value.
Of course the overall shape should be the same
0 Kommentare
Antworten (1)
Star Strider
am 10 Nov. 2021
Add these calls after the surf call —
colormap(turbo)
shading('interp')
The surf plot should then be close to what appears to be the desired result.
T = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/796594/data1.xlsx') ;
% T = table2array(T) ;
x = T(1,2:end); %
y = T(2:end,1); %
Z = T(2:end,2:end); % use fillmissing to fill NaNs
[X,Y] = meshgrid(x,y) ;
[xq,yq] = meshgrid(2:0.1:10); % grid 0.1
Zq = interp2(x,y,Z,xq,yq,'spline'); % spline
figure
AA = surf(xq,yq,Zq);
colormap(turbo)
shading('interp')
title('(spline,cubic,makima) Interpolation Using Finer Grid');
.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!