[Scilab-users] vectoriztion and sets of data
    Adrien Vogt-Schilb 
    vogt at centre-cired.fr
       
    Thu Nov 22 15:54:15 CET 2012
    
    
  
On 22/11/2012 15:48, Paul Carrico wrote:
>
> Dear All,
>
> On the above example, it should be possible to select a sets of rows, 
> should not ? if so how please ?
>
> Thanks
>
> Paul
>
Hi
Didn't understand your question, have a look at this:
A=[1:10]'*2
rows = [1;6;2]
B=zeros(A)
B(rows) = A(rows)
hope this helps
> ###################################################
>
> mode(0)
>   
> /// initial matrix/
> A  =  rand(8,6);
> B  =  zeros(8,6);
> C  =  [A  ;  A;  B;  A;  B;  B;  A];
> [nr,nc]  =  size(C);
>   
> /// each set of 8 rows is analysed/
> Search  =  zeros((nr/8),1);
> ///i = ones((nr/8),1).* 1;/
> i  =  [1:(nr/8)]';
> /// Search = max(abs(C((8*(i - 1) + 1):(8 * i),:)));/
> Search  =  max(abs(C([i.  *  8  -  7  :i.  *  8],:)));
> B  =  (find(Search  ==  0))';
>   
> D  =  zeros((nr/8),1);
> D(B,2)  =  1;
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121122/528c0a21/attachment.htm>
    
    
More information about the users
mailing list