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: MATLAB Code
Replies: 1   Last Post: Jan 17, 2013 1:27 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
anyone

Posts: 26
Registered: 12/22/12
Re: MATLAB Code
Posted: Jan 17, 2013 1:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thu, 17 Jan 2013 04:25:11 +0000, kalai arasi wrote:

> Any one can explain the given code line by line.
>
> [n1 n2]=size(BW);
> r=floor(n1/10);
> c=floor(n2/10);
> x1=1;x2=r;
> s=r*c;
>
> for i=1:10
> y1=1;y2=c;
> for j=1:10
> if (y2<=c | y2>=9*c) | (x1==1 | x2==r*10)
> loc=find(BW(x1:x2, y1:y2)==0);
> [o p]=size(loc);
> pr=o*100/s;
> if pr<=100
> BW(x1:x2, y1:y2)=0; r1=x1;r2=x2;s1=y1;s2=y2;
> pr1=0;
> end imshow(BW);
> end
> y1=y1+c;
> y2=y2+c;
> end
>
> x1=x1+r; x2=x2+r;
> end
> figure,imshow(BW)


Possibly. Why?




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.