Help explain interpolated surface coloring
이전 댓글 표시
I have the follwoing 11x11 data grid:
x = 0:10
y = 0:10
data = [0.489352000000000 0.484068000000000 0.511895000000000 0.529349000000000 0.550050000000000 0.589397000000000 0.607263000000000 0.641485000000000 0.662575000000000 0.687064000000000 0.713925000000000
0.507529000000000 0.527680000000000 0.538550000000000 0.557169000000000 0.577756000000000 0.614422000000000 0.657682000000000 0.676427000000000 0.684739000000000 0.714883000000000 0.738783000000000
0.538647000000000 0.548932000000000 0.566195000000000 0.580673000000000 0.618064000000000 0.654818000000000 0.689324000000000 0.702041000000000 0.719743000000000 0.733533000000000 0.764315000000000
0.556159000000000 0.573411000000000 0.596687000000000 0.623561000000000 0.671057000000000 0.689452000000000 0.714168000000000 0.730792000000000 0.748139000000000 0.774988000000000 0.788946000000000
0.590044000000000 0.600503000000000 0.634420000000000 0.648230000000000 0.685438000000000 0.721476000000000 0.746399000000000 0.759050000000000 0.782877000000000 0.790311000000000 0.816816000000000
0.620506000000000 0.638116000000000 0.665363000000000 0.676466000000000 0.716868000000000 0.749803000000000 0.754542000000000 0.779754000000000 0.801076000000000 0.827632000000000 0.854378000000000
0.663773000000000 0.672726000000000 0.696712000000000 0.710226000000000 0.735066000000000 0.747308000000000 0.775699000000000 0.807429000000000 0.828759000000000 0.855226000000000 0.875827000000000
0.695315000000000 0.709644000000000 0.726708000000000 0.740776000000000 0.768420000000000 0.799622000000000 0.796054000000000 0.825712000000000 0.846637000000000 0.876592000000000 0.897063000000000
0.719426000000000 0.727156000000000 0.748276000000000 0.762108000000000 0.796051000000000 0.804258000000000 0.813496000000000 0.820555000000000 0.868153000000000 0.888011000000000 0.908845900000000
0.743718000000000 0.754901000000000 0.765970000000000 0.776975000000000 0.811003000000000 0.825777000000000 0.828351000000000 0.841359000000000 0.869123000000000 0.903499400000000 0.914743600000000
0.765627000000000 0.770041000000000 0.787120000000000 0.801125000000000 0.823051000000000 0.837764000000000 0.845964000000000 0.862046000000000 0.883647000000000 0.895037000000000 0.919736800000000]
[xgrid, ygrid] = meshgrid(x,y)
When dsplayed as a surface with facecolor = 'interp', I get slightly differenent results depending on if my data is organized "top to bottom" or "bottom to top." Why? The values at each x-y vertex of a cell are identical. I assumed MATLAB was perfoming a linear interpolation for the coloring within each cell. But these results indicate something unknown...
figure;
colormap(jet(32))
surface(xgrid, ygrid, data, EdgeAlpha=0.2, FaceColor='interp');
colorbar
figure;
colormap(jet(32))
surface(flipud(xgrid), flipud(ygrid), flipud(data), EdgeAlpha=0.2, FaceColor='interp');
colorbar
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!









