vectorization



I need to substantially speed up the following loop, which is
executed many times and accounts for >90% of the total
processing time of my algorithm. Can it be vectorized? I can't see
how to do it. Is there an existing m file function that I might use?
I tried colfilt, but it was slower.

I'd appreciate any help you can give.

Kevin

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for m=1:w
n=2.^m;
for g=n+1:r-n
s(g,m+1)=sum(s(g-n:g+n,m));
end
end
.



Relevant Pages

  • Re: fmincon options playing
    ... I'm trying to make my fmincon optimization more efficient by playing ... optimization in a loop where at the end I take the minimum over all ... I don't know how MaxIter and MaxFunEvals affect the processing time. ...
    (comp.soft-sys.matlab)
  • Re: variable inside loop
    ... I've been wondering if there is any speed related benefit if I had ... declared variable b outside of the loop. ... of times would take up loads of the processing time. ...
    (microsoft.public.dotnet.languages.vc)
  • variable inside loop
    ... I've been wondering if there is any speed related benefit if I had declared variable b outside of the loop. ... constructor evoked dozens of times would take up loads of the processing time. ... Can anyone elaborate on how VC copes with variables of basic types declared inside loops rather than outside? ...
    (microsoft.public.dotnet.languages.vc)
  • fmincon options playing
    ... I'm trying to make my fmincon optimization more efficient by playing ... optimization in a loop where at the end I take the minimum over all ... I don't know how MaxIter and MaxFunEvals affect the processing time. ...
    (comp.soft-sys.matlab)
  • Disregard last msg(but check this one)
    ... I'm trying to make my fmincon optimization more efficient by playing ... optimization in a loop where at the end I take the minimum over all ... I don't know how MaxIter and MaxFunEvals affect the processing time. ...
    (comp.soft-sys.matlab)