New to fortran please Help!



hello all,
i have a fortran code and i want to add a small loop to remove
outliers from my data set and this is what i wrote:

c remove outliers (val-mean>3*std)
do i=1,mlen
mu=mu+a(i)/mlen
sigma=sigma+a(i)*a(i)
std=sqrt(sigma(i)/mlen-mu*mu)
sstd=3*std
if(a(i).gt.sstd) then
a(i)=-9999.
endif
enddo

when i compile it in fortran 77 i get this error:
if(a(i).gt.sstd) then
^
"test_out.f", Line = 242, Column = 12: ERROR: The conditional
expression must be scalar.

i have tried to correct it but still no luck so i returned to the
original script (the one i post here). Please if you have any idea,
share it with me, because i keep staring it...

Thank you in advance.
.



Relevant Pages

  • Re: New to fortran please Help!
    ... i have a fortran code and i want to add a small loop to remove ... outliers from my data set and this is what i wrote: ... my compiler is fortran 77 intel compiler. ...
    (comp.lang.fortran)
  • Re: New to fortran please Help!
    ... i have a fortran code and i want to add a small loop to remove ... outliers from my data set and this is what i wrote: ... Since we do not know if you included in your F77 code ...
    (comp.lang.fortran)
  • Re: New to fortran please Help!
    ... i have a fortran code and i want to add a small loop to remove ... outliers from my data set and this is what i wrote: ...
    (comp.lang.fortran)
  • Re: New to fortran please Help!
    ... Lilita wrote: ... i have a fortran code and i want to add a small loop to remove ... outliers from my data set and this is what i wrote: ... You'll need *one* array, a. ...
    (comp.lang.fortran)
  • Re: New to fortran please Help!
    ... i have a fortran code and i want to add a small loop to remove ... outliers from my data set and this is what i wrote: ... to put values in an array, a, and compute the sum of the elements of a. ... I know, this is probably a homework assignment, and you're under ...
    (comp.lang.fortran)