points2distances.m
来自「本代码为基于matlab的求解偏微分方程的利用径向基函数的无网格方法的源码」· M 代码 · 共 5 行
M
5 行
function distances = points2distances (points) % create distance matrix from point matrix
[numpoints,dim]=size(points); % get dimensions
distances=points*points'; % all inner products between points
lsq=diag(distances); % vector of squares of norms of points
distances=sqrt(repmat(lsq,1,numpoints)+repmat(lsq,1,numpoints)'-2*distances); % distance matrix
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?