source: MML/trunk/machine/SOLEIL/common/naff/naffutils/plusprochereson.m

Last change on this file was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 402 bytes
Line 
1function str = plusprochereson(pt,tab)
2% function str = plusprochereson(pt,tab)
3% Cherche la droite definie dans tab la plus proche du point pt
4
5d= [];
6for k=1:size(tab,1)
7    d(k) = dist_point_droite(tab(k,1),tab(k,2),tab(k,3), pt);
8end
9[a ai]=min(d);
10k=ai;
11
12str = sprintf('%d fx + %d fz = %d', tab(k,1), tab(k,2), tab(k,3));
13fprintf('Resonance: %d fx + %d fz = %d\n', tab(k,1), tab(k,2), tab(k,3));
Note: See TracBrowser for help on using the repository browser.