The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: very large array
Replies: 18   Last Post: Jun 26, 2013 2:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Lorenzo Quadri

Posts: 8
Registered: 6/24/13
Re: very large array
Posted: Jun 25, 2013 2:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <> wrote in message <kqaumh$4ko$>...
> 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...
> --

I can't do logic discrimination on dataset on loading because is created by an other program as complete array (matlab workspace format).
I can iterate the whole dataset and mark zeros the rows I want to delete, but then I've to delete the rows in possible fast way.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.