From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: very large array
Date: Mon, 24 Jun 2013 21:19:51 -0500
Organization: NNTP Server
Lines: 26
Message-ID: <kqaumh$4ko$>
References: <kq9hdf$bsa$> <kq9khs$kvi$> <kq9n1f$smu$> <kq9nib$12h$> <kq9r5n$21t$> <kqakig$i31$>
NNTP-Posting-Host: jy+QfeYoQFMk8Or4YOj/
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: comp.soft-sys.matlab:798139

On 6/24/2013 6:26 PM, James Tursa wrote:
> dpb <> wrote in message <kq9r5n$21t$>...
>> While doing it by a loop is _NOT_ the way for large cases, sometimes
>> it is handy and time isn't an issue for small array sizes. The way in
>> general to do such things is to start at the end and progress
>> forwards--that way the lower indices aren't affected by the deleted
>> rows...
>> for i=length(dat):-1:1
>> if((sum(dati(i,:))<355) & range(dati(i,:))>20)
>> dati(i,:) = [];
>> end
>> end
> I understand what you are saying about using a loop on small datasets,
> but IMO this is never a good way to program in MATLAB, even on small
> datasets....

I don't recall saying it was a "good" way...just that it won't be 
terribly noticeable on small datasets.

And, yes, no, I'd never program that way in Matlab unless I had some 
ulterior motive as in this posting as a pedagogical tool...