如何在matlab中使用较小的曲面

问题描述 投票:0回答:1

我想制作较小网格的网格,了解它是如何完成的?也就是说,x轴和y中的路径为0.25 in 0.25,

x = (0: 0.25: 7);
y = (0: 0.25: 7);

我有以下矩阵。这个矩阵模拟人口的动态(投影矩阵)

L2=[0 0 0 0 127 4 80;
    0.6747 0.7370 0 0 0 0 0;
    0 0.0486 0.6610 0 0 0 0; 
    0 0 0.0147 0.6907 0 0 0;
    0 0 0 0.0518 0 0 0;
    0 0 0 0 0.8091 0 0;
    0 0 0 0 0 0.8091 0.8089];

通过这段代码,我找到了L2左右的特征向量。同样,我找到灵敏度和弹性矩阵。

A=L2;
[W,lambdas]=eig(A);
V=conj(inv(W));
lambdas=diag(lambdas);
[lambdas,I]=sort(lambdas);
lambdas=flipud(lambdas);
lambda1=lambdas(1);
I=flipud(I);
W=W(:,I);
V=V(I,:);
w=W(:,1);
w=w/sum(w);
v=real(V(1,:))';
v=v/v(1);
% matrix of sensitivity
senmat=v*w';
% matrix of elasticity
emat=senmat.*A/max(eig(A));

然后,我制作灵敏度矩阵的表面。

surf(senmat)

这是结果:This is a surface of the matrix of sensitivity

我需要使表面的正方形(网格)更小。

有任何想法吗?

最好的祝福!

matlab matrix grid mesh surface
1个回答
0
投票

如果您有(x,y)为senmat定义,则可以使用interp2。了解interp2。如果你只想让senmat精炼使用imresize。

A = imresize(senmat,[100,100]) ;
surf(A)

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.