Static Public Member Functions | |
| static void | main (String[] args) |
Definition at line 3 of file Strings2.java.
| static void Strings2::main | ( | String[] | args | ) | [inline, static] |
Definition at line 5 of file Strings2.java.
References javasci::SciStringArray::Get(), i, j, and s.
00006 { 00007 String[] s=new String[1000]; 00008 char[] ch=new char[3100]; 00009 int r,c,k; 00010 k=0; 00011 for(int i=0;i<s.length;i++) 00012 { 00013 for(int j=0;j<ch.length;j++) 00014 { 00015 if (k == 0) 00016 { 00017 ch[j]='P'; 00018 k++; 00019 } 00020 else if (k == 1) 00021 { 00022 ch[j]='S'; 00023 k++; 00024 } 00025 else 00026 { 00027 ch[j]='A'; 00028 k=0; 00029 } 00030 00031 } 00032 s[i]=new String(ch); 00033 } 00034 00035 SciStringArray sSA=new SciStringArray("A",s.length,1,s); 00036 //sSA.disp(); 00037 Scilab.Exec("Sa=size(A);"); 00038 Scilab.Exec("disp(Sa);"); 00039 00040 SciStringArray ssB = new SciStringArray("B",s.length,1); 00041 Scilab.Exec("B=A+string([1:"+s.length+"]);"); 00042 00043 ssB.Get(); 00044 //ssB.disp(); 00045 00046 00047 Scilab.Exec("Sb=size(B);"); 00048 Scilab.Exec("disp(Sb);"); 00049 // 1 1000 taille matrice de chaines 00050 00051 Scilab.Exec("len=length(B(Sb(2)));"); 00052 Scilab.Exec("disp(len);"); 00053 // 3104 caracteres 00054 00055 Scilab.Exec("TEST=part(B(Sb(2)),len-7:len);"); 00056 // PSAP1000 00057 Scilab.Exec("disp(TEST);"); 00058 00059 }
Here is the call graph for this function:

1.5.1