help-octave
[Top][All Lists]
Advanced

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

Re: help please


From: Nicholas Jankowski
Subject: Re: help please
Date: Wed, 29 Jul 2015 10:22:36 -0400

On Wed, Jul 29, 2015 at 4:37 AM, mrtgc <address@hidden> wrote:
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=""> 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..




can you reply to the group with a sample of the data?  and copy and paste the exact error messages you receive. someone may find an easy fix, but the more info you provide the easier it will be.

Nick J

reply via email to

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