i have some datas which are included some deflection and force values. Like deltaX deltaY and forces measured at that points as Fx and Fy. I want to create a colormap at that po
You can use meshgrid
and surf
or mesh
command to plot it:
[X,Y] = meshgrid(filein(:,1),filein(:,2));
M = sqrt(filein(:,3).^2+filein(:,4).^2);
Z=meshgrid(M,M);
C = gradient(Z);
figure
surf(X,Y,Z,C);colorbar
You can remove the mesh and interpolate as follows:
surf(X, Y, Z,'EdgeColor', 'None', 'facecolor', 'interp');
Then view it from above:
view(2)