help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help please


From: mrtgc
Subject: help please
Date: Wed, 29 Jul 2015 01:37:27 -0700 (PDT)

I have a file that has 11 columns, these columns I'm interested 3 (actually
2, the third helps me to compare rows) so I need the third column that
prints compare the ranks. So divided into groups the other two columns where
the row of the third column are equal. I apply: 

f = fopen('prueba.224');
d = textscan(f,'%*d %*s %*d %*d %*d %d %*d %*d %*d %d %f ');
fclose(f);
elv=d(1);
dif=d(2);
t=d(3);
i=1;
j=1;
ii=length(t);
        while i<ii
            Eq(i)=find(t==t(i));
            L=length(Eq);
            pesos(j)=(sin(elv(Eq(i))))^2;
            x1(j)=sum(dif(Eq(i))*pesos(j))/sum(pesos);
            i=i+L;
            i=i+L;
            j=j+1;
        end



File example:
&lt;nabble_img
src=&quot;11751967_1069274343090419_6224200252565883121_n.jpg&quot;
border=&quot;0&quot; class=&quot;center&quot;/>

my goal is, from the last column split the data into groups of rows where
these coincide in the last column, and then these groups want to get two
columns of concrete that if I can do as I put in command previous. 
But the code has failures and I do not know what failures are..



--
View this message in context: 
http://octave.1599824.n4.nabble.com/help-please-tp4671877.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]