[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help please
From: |
mrtgc |
Subject: |
Re: help please |
Date: |
Thu, 30 Jul 2015 01:48:29 -0700 (PDT) |
YES!!! thank you very much! , in the end I fixed it differently:
f = fopen('prueba.224');
d = textscan(f,'%*d %*s %*d %*d %*d %f %*d %*d %*d %f %s ');
fclose(f);
nume = ((sin(d{1}(1)))^2)*(d{2}(1));
den = ((sin(d{1}(1)))^2);
long = length(d{1});
i=1;
j=1;
while (i < long)
if ( strcmp(d{3}(i),d{3}(i+1)) )
i = i + 1;
nume = nume + ((sin(d{1}(i)))^2)*(d{2}(i));
den = den + ((sin(d{1}(i)))^2);
else
A(j,1) = nume/den;
i = i + 1;
j = j + 1;
nume = ((sin(d{1}(i)))^2)*(d{2}(i));
den = ((sin(d{1}(i)))^2);
end
end
--
View this message in context:
http://octave.1599824.n4.nabble.com/help-please-tp4671877p4671899.html
Sent from the Octave - General mailing list archive at Nabble.com.