Plotting interpolated values as filled contours

6 views (last 30 days)
Hi Ladys and Gends.
I've the task to plot interpolated values. As you can see in the pictures, one figure is working very well.
However two of these three dont.
I dont know why.
Also, here is my Code:
Maybe someone has an idea, how to adjust the code.
Best
Felix
  3 Comments
Felix Ja
Felix Ja on 25 Aug 2021
xi=0:2:650; %aufspannen koordinatensystem
yi = 0:2:415;
figure(10);
x=log10(porosity);
y=3.0227*x-12.902;
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),y,XI,YI, 'v4');
v = (min(y) : 0.2 : max(y));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
set(colorbar,'yColor','b');
title('Interpolated scattered logarithmic permeability (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
figure(11); %das funktioniert noch nicht richtig
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),reservoir(:,3),XI,YI, 'v4');
v = min(reservoir(:,3)) : 2 : max(reservoir(:,3));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
colorbar('Direction','reverse');
set(colorbar,'yColor','g');
title('Interpolated scattered porosity (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
figure(12); %das glaube ich auch nicht
x2=porosity;
y2 = -1720.2091*x2 + (2548.5491); %ich weiß nicht, ob die density-Werte stimmen
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),y2,XI,YI, 'v4');
v = min(reservoir(:,4)) : 0.2 : max(reservoir(:,4));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
colorbar;
colorbar('Direction','reverse');
set(colorbar,'yColor','m')
lim = caxis;
caxis([00 2500]); %hier hab ich versucht die Colorbargrenzen zu versetzen aber das hat iwie nicht funktioniert
title('Interpolated scattered density (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
Felix Ja
Felix Ja on 25 Aug 2021
okay, i got it. Just change the aray in v between the min and max.
Nice

Sign in to comment.

Answers (0)

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!