Interpolated contour plot with excel data

2 visualizaciones (últimos 30 días)
Scott Lines
Scott Lines el 22 de Oct. de 2021
Comentada: Star Strider el 22 de Oct. de 2021
I have xyz data (8 values of x and y but then 64 values of z)
I'd like to plot this in a filled contour plot with interpolated data between values, but I can't seem to find a way to do it, I've researched several methods but keep hitting a dead end pretty much as soon as I start, I can't seem to arrange the data correctly and am not sure of the correct way to get it to interpolate.
I have attached the data, any assistance would be greatly appreciated.

Respuesta aceptada

Star Strider
Star Strider el 22 de Oct. de 2021
I’m guessing as to what ‘x’ and ‘y’ are, however it will be easy to reverse them if I guessed wrong.
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/774963/RMSE_Surface%20v2.xlsx', 'VariableNamingRule','preserve')
T1 = 9×9 table
Var1 Var2 Var3 Var4 Var5 Var6 Var7 Var8 Var9 ____ ________ ________ ________ ________ ________ _______ _______ ______ NaN 0 1e-09 1e-08 1e-07 3.25e-07 5.5e-07 1e-06 1e-05 0.75 0.25045 0.25045 0.25044 0.25317 0.29564 0.42009 0.81573 2.0761 1 0.14178 0.14175 0.14174 0.14433 0.1862 0.30269 0.66496 2.0753 1.25 0.07097 0.070949 0.070917 0.07447 0.12324 0.23495 0.56271 2.0731 1.5 0.056406 0.056401 0.056385 0.060392 0.10724 0.20559 0.49573 2.0697 1.75 0.088706 0.08873 0.088742 0.14371 0.12485 0.20298 0.45418 2.0648 2 0.12592 0.12596 0.12599 0.15762 0.15353 0.21512 0.43052 2.0587 2.25 0.15972 0.15976 0.1598 0.18004 0.18306 0.23359 0.4191 2.0513 2.5 0.18972 0.18978 0.18983 0.20466 0.21072 0.25407 0.41576 2.043
x = T1{1,2:end};
y = T1{2:end,1};
z = T1{2:end,2:end};
figure
contourf(x, y, z)
Experiment to get different results.
.
  2 comentarios
Scott Lines
Scott Lines el 22 de Oct. de 2021
Thank you
Star Strider
Star Strider el 22 de Oct. de 2021
As always, my pleasure!
.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by