I need a picture of a graph similar to the one I posted
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 10 de Nov. de 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 comentarios
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!