help-octave
[Top][All Lists]
Advanced

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

Re: Successive Over-Relaxation ... what is wrong? Improvements?


From: Joza
Subject: Re: Successive Over-Relaxation ... what is wrong? Improvements?
Date: Tue, 6 Nov 2012 08:03:00 -0800 (PST)

Thanks for the info...stuff to think about! Besides all this, is there any
neat ways to speed up plain old FOR loops using vectors? For example, the
ones I have below:

for i=1:n
                sum = 0.0;
                
                if i==1
                        for j=1:2
                                sum = sum + A(i,j)*x(j);
                        end
                elseif i==n
                        for j=n-1:n
                                sum = sum + A(i,j)*x(j);
                        end
                else
                        for j=i-1:i+1
                                sum = sum + A(i,j)*x(j);
                        end
                end




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Successive-Over-Relaxation-what-is-wrong-Improvements-tp4646041p4646166.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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