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: i want to simplify this code
Replies: 14   Last Post: Apr 22, 2013 7:11 AM

Advanced Search

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

Posts: 18
From: egypt
Registered: 12/10/07
Re: i want to simplify this code
Posted: Apr 7, 2013 5:46 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

thnx too much .. its work now

but i want modify it to work with this formula

All= zeros(size(I));

[x2,y2]=find(S==2);
for n2=1:length(x2)
B1=T2* I(x2(n2):x2(n2)+1,y2(n2):y2(n2)+1)* T2';
R1=B1.*mask2;
F1=T2'*R1*T2;
All(x2(n2):x2(n2)+1,y2(n2):y2(n2)+1)=F1;
end

[x4,y4]=find(S==4);
for n4=1:length(x4)
B2=T4*I(x4(n4):x4(n4)+3,y4(n4):y4(n4)+3)*T4';
R2=B2.*mask4;
F2=T4'*R2*T4;
All(x4(n4):x4(n4)+3,y4(n4):y4(n4)+3)=F2;

end

... etc




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.