help-octave
[Top][All Lists]
Advanced

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

Re: trying to optimize my octave program


From: Judd Storrs
Subject: Re: trying to optimize my octave program
Date: Thu, 18 Mar 2010 14:42:19 -0400

>       for c_thd = c_thd_min : c_thd_st : c_thd_max
>         for r_thd = r_thd_min : r_thd_st : r_thd_max
>           for t_thd = t_thd_min : t_thd_st : t_thd_max
>             for b_thd = b_thd_min : b_thd_st : b_thd_max

Just speculating again, but I suspect that these four loops are prime
candidates for replacement by vectorization. Perhaps analyze() can be
modified to handle c_thd, r_thd, t_thd, b_thd as matrix/vector forms
of these variables. ndgrid may help with this:

[c_thd, r_thd, t_thd, b_thd ] = ndgrid( [c_thd_min:c_thd_st:c_thd_max]
, [r_thd_min:r_thd_st:r_thd_max] , [ t_thd_min:t_thd_st:t_thd_max] , [
b_thd_min:b_thd_st:b_thd_max] )


--judd


reply via email to

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