summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Lineplot.sci
blob: bc44c2e95e6bcd3f23d2e3b12c26e04841f84755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// 09.10.09
// 09.10.12
// 09.11.01
// 09.11.12
// 09.12.06
// 10.12.04

function Out=Lineplot(varargin)
  Nargs=length(varargin);
  A=varargin(1);
  if type(A)==1        //  09.11.12 from
    Tmp=length(A);
    if Tmp>3
      B=A(Tmp/2+1:Tmp);
      A=A(1:Tmp/2);
      Is=2;
    else
      B=varargin(2);
      Is=3;
    end;
  else
    B=A(2);
    A=A(1);
    Is=2;
  end;                 // upto
  Mag=100; Semi='';
  for I=Is:Nargs
    Tmp=varargin(I);
    select type(Tmp)
      case  1
        Mag=Tmp;
      case 10
        Semi=Tmp;
    end;
  end;
  V= Mag/norm(B-A)*(B-A)      // 10.12.04 from here
 if Semi=="" 
   Out=Listplot(A-V,A+V)
 elseif Semi=="+"
   Out=Listplot(A,A+V)
 else
   Out=Listplot(A-V,A)
 end                                              //  10.12.04 to here
endfunction;