MESH toolbox  0.1
Matlab/Octave mesh utils
 All Files Functions Groups Pages
EdgeLengthOpt.m
Go to the documentation of this file.
1 function lbe=EdgeLengthOpt(be,q)
2 % function lbe=EdgeLengthOpt(be,q)
3 % Compute length of boundary edges
4 %
5 % Parameters:
6 % be: `2\times\nbe` 'int32' array,`\be(\jl,k)` index of storage, in the array `\q`, of the `\jl`-th
7 % vertex of the edge of index `k`, `\jl\in\{1,2\}` and `k\in\{1,\hdots,\nbe\}.`
8 % Also noted `\be`.
9 % 'q': `2\times\nq` array, `{\q}(\il,j)` is the `\il`-th coordinate of the `j`-th vertex, `\il\in\{1,2\}` and `j\in\{1,\hdots,n_q\}.`
10 % Also noted `\q`.
11 %
12 % Return values:
13 % lbe: `1\times\nbe` array, lbe(k) is the length of edge k.
14 lbe=sqrt(sum((q(:,be(1,:)) - q(:,be(2,:))).^2,1));