From: David Miller on
I have an MxN array of imported values and have a certain cutoff threshold. What's the best way to change all the values below that threshold in the array to 1? I was thinking of using an 'if' loop but it won't seem to work. I need to keep the size of the array the same.

Any help would be appreciated,
David
From: dpb on
David Miller wrote:
> I have an MxN array of imported values and have a certain cutoff
> threshold. What's the best way to change all the values below that
> threshold in the array to 1? I was thinking of using an 'if' loop but it
> won't seem to work. I need to keep the size of the array the same.
>
> Any help would be appreciated,
> David

x(x<thresh) = 1;

--
From: David Miller on
dpb <none(a)non.net> wrote in message <i2npfh$8al$2(a)news.eternal-september.org>...
> David Miller wrote:
> > I have an MxN array of imported values and have a certain cutoff
> > threshold. What's the best way to change all the values below that
> > threshold in the array to 1? I was thinking of using an 'if' loop but it
> > won't seem to work. I need to keep the size of the array the same.
> >
> > Any help would be appreciated,
> > David
>
> x(x<thresh) = 1;
>
> --
Wow, bit of a brain fart there from me. Trying to make it way too complicated.
Thanks,
David