?? symdist.m
字號(hào):
% function sd = symdist(i,j,coord,area)%% Arguments:% i,j - node indices% coord - coordinates of nodes% area - size of torus (x,y)%% Returns:% sd - distance between nodes% % calculates distance between nodes <i> and <j> with coordinates from <coord>% assuming they are placed on a torus with dimensions <area>. % function sd = symdist(i,j,coord,area)sd = Inf;cd = [coord(j,:); coord(j,:) + [area(1),0]; coord(j,:) - [area(1),0]; ... coord(j,:) + [0, area(2)]; coord(j,:) - [0, area(1)]];for k=1:5 sd = min(sd, sqrt((coord(i,1)-cd(k,1))^2 + (coord(i,2)-cd(k,2))^2));end
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -