Warning, /utils/matlab/cs_grid/bk_line/shift_bk_line.m is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit 28aaff14 on 2007-02-05 05:24:33 UTC
28aaff1409 Jean*0001 function [nABpts,svFlg,svIJuv,svXsg,svYsg] = shift_bk_line( ...
0002 nc,ydim,jl,xa,ya,xb,yb,savNpts,savFlg,savIuv,savJuv,savXsg,savYsg);
0003
0004 [I]=find(savXsg(:,jl) == xa & savYsg(:,jl) == ya);
0005 if length(I) == 1, fprintf(' line position of A : %i ;',I);
0006 else error(' A disapear !'); end
0007 if I > 1,
0008 %- shift so that it starts from A:
0009 sNp=savNpts(jl);
0010 svFlg([1:sNp])=savFlg([I:sNp 1:I-1],jl);
0011 svIuv([1:sNp])=savIuv([I:sNp 1:I-1],jl);
0012 svJuv([1:sNp])=savJuv([I:sNp 1:I-1],jl);
0013 svIJuv=svIuv+6*nc*(svJuv-1);
0014 svXsg([1:sNp+1])=savXsg([I:sNp 1:I],jl);
0015 svYsg([1:sNp+1])=savYsg([I:sNp 1:I],jl);
0016 end
0017
0018 [J]=find(svXsg == xb & svYsg == yb);
0019 if length(J) == 1, fprintf(' line position of B : %i\n',J+I-1);
0020 else error(' B disapear !'); end
0021 nABpts=J-1;
0022
0023 return