Creating colormap at specific point and color weights at matlab

前端 未结 1 1252
孤街浪徒
孤街浪徒 2021-01-27 23:07

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

1条回答
  •  臣服心动
    2021-01-27 23:54

    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)
    

    0 讨论(0)
提交回复
热议问题