[Scilab-users] Bug 6737

2012-11-22 Thread Frei Matthias

Hi,

I've seen the bug report http://bugzilla.scilab.org/show_bug.cgi?id=6737.
The report is 2 years old, can we still hope it will be fixed? 

Thanks,
Matthias

ferag...
Ferag AG
Matthias Frei
Forschung  Entwicklung
Zürichstrasse 74
CH-8340 Hinwil
Telefon +41 44 938 65 86
matthias.f...@ferag.com
www.ferag.com http://www.ferag.com/ 




This message is intended only for [users@lists.scilab.org]. If you are not 
the intended recipient you are notified that disclosing, copying, distributing 
or taking any action in reliance on the contents of this information is 
strictly prohibited.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] vectoriztion and sets of data

2012-11-22 Thread Paul Carrico
Dear All,

 

On the above example, it should be possible to select a sets of rows, should
not ? if so how please ?

 

Thanks

 

Paul

 

###

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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] vectoriztion and sets of data

2012-11-22 Thread Adrien Vogt-Schilb

Hi again

I am still not sure, but look at the output of

A=rand(8,6)

B=zeros(8,6)

D = A  B

D = bool2s (A  B)

This might give you insight on how to solve your problem
tell me if not

On 22/11/2012 16:06, Paul Carrico wrote:


The original code looked like ... I'm trying to optimized it (ok for 
the if, but how to combine a set of data and vectorization (??? Many 
trials but I failed)


/// initial matrix/

A=rand(8,6);

B=zeros(8,6);

C=[A;A;B;A;B;B;A];

[nr,nc]=size(C);

/// original code looks like/

D=zeros((nr/8),1);

fori=1:(nr/8)

search=max(abs(C((8*(i-1)+1):(8*i),:)));

if(search0)then

D(i,1)=1;

else

D(i,1)=0;

end

end

*De :*users-boun...@lists.scilab.org 
[mailto:users-boun...@lists.scilab.org] *De la part de* Adrien Vogt-Schilb

*Envoyé :* jeudi 22 novembre 2012 15:54
*À :* International users mailing list for Scilab.
*Objet :* Re: [Scilab-users] vectoriztion and sets of data

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@lists.scilab.org  mailto:users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users