Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: Thresholding
Replies: 2   Last Post: Apr 4, 2013 11:56 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Thomas Bunn

Posts: 11
Registered: 11/5/12
Re: Thresholding
Posted: Apr 4, 2013 11:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Nasser M. Abbasi" wrote in message <kjlhm3$bak$1@speranza.aioe.org>...
> On 4/4/2013 10:44 PM, Thomas Bunn wrote:
> > What is the MatLab function for the following routine?
> >
> > for n=1:N+1
> > for m=1:N+1
> > if F(n,m)>Thresh;
> > F(n,m)=F(n,m) - Thresh;
> > else
> > F(n,m)=0;
> > end
> > end
> > end
> >
> > Thanks for the tip.
> >

>
> EDU>> F=rand(5);
> F =
> 0.8147 0.0975 0.1576 0.1419 0.6557
> 0.9058 0.2785 0.9706 0.4218 0.0357
> 0.1270 0.5469 0.9572 0.9157 0.8491
> 0.9134 0.9575 0.4854 0.7922 0.9340
> 0.6324 0.9649 0.8003 0.9595 0.6787
>
> EDU>> thresh=.5;
> EDU>> F(F<thresh)=0
>
> 0.8147 0 0 0 0.6557
> 0.9058 0 0.9706 0 0
> 0 0.5469 0.9572 0.9157 0.8491
> 0.9134 0.9575 0 0.7922 0.9340
> 0.6324 0.9649 0.8003 0.9595 0.6787
>
> EDU>> F(F>=thresh)=F(F>=thresh)-thresh
>
> 0.3147 0 0 0 0.1557
> 0.4058 0 0.4706 0 0
> 0 0.0469 0.4572 0.4157 0.3491
> 0.4134 0.4575 0 0.2922 0.4340
> 0.1324 0.4649 0.3003 0.4595 0.1787


THANK-YOU



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.