|
From: | Doug Stewart |
Subject: | Re: help please |
Date: | Wed, 29 Jul 2015 22:59:22 -0400 |
https://www.dropbox.com/s/4mt3jyt0bkvslnr/prueba.224?dl=0
In this direction you can see the file of which I speak , not because when I
upload photos to the page are not , so I will pass the link is easier .
And this is the error:
>> prueba2
warning: fopen: file found in load path
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
everything works fine until the length, in the next line I do not get what I
want . That is taking the corresponding rows where t satisfies equality take
up columns defined as ELV and dif, to average the data:
adding the product of the square sins of ELV and dif, and divide that amount
enters the sum of squares of ELV sins
[Prev in Thread] | Current Thread | [Next in Thread] |