Could anyone please tell me what is the comments given in the matlab code?

Discussion in 'General Electronics Chat' started by tojeena, Mar 4, 2013.

  1. tojeena

    Thread Starter Active Member

    May 2, 2009
    118
    0
    Could anyone please tell me what is the comments given in the matlab code? or any reference material to get idea about this code?
    Code ( (Unknown Language)):
    1. function y=IWT(x)  
    2. x=imread('lenna.gif');
    3. subplot(2,3,1);imshow(x);title('Ô*ͼÏñ');
    4. x=double(x);
    5. y=x;  
    6. [hp,lp]=size(x);
    7. hc=hp/2;  lc=lp/2;
    8. %----------------ÆæżÁÐÖØÅÅ
    9. for n=1:lc          
    10.     j=n*2-1;          
    11.     y(:,n)=x(:,j);        
    12.     y(:,lc+n)=x(:,j+1);
    13. end
    14. subplot(2,3,2);imshow(uint8(y)); title('ÆæżÁÐÖØÅÅ');
    15. %-----------------ÐÐÖØÅÅ  
    16. for n=1:lc        
    17.     y(:,lc+n)=y(:,lc+n)-y(:,n);
    18. end  
    19. for n=1:lc        
    20.     k=y(:,lc+n)/2-mod(y(:,lc+n)/2,1);      
    21.     y(:,n)=y(:,n)+k;
    22. end
    23. subplot(2,3,3);imshow(uint8(y));title('ÐÐÖØÅÅ');  
    24. %---------------ÆæżÐÐÖØÅÅ
    25. x=y;
    26. for n=1:hc        
    27.     j=n*2-1;          
    28.     y(n,:)=x(j,:);          
    29.     y(hc+n,:)=x(j+1,:);  
    30. end
    31. subplot(2,3,4);imshow(uint8(y));title('ÆæżÐÐÖØÅÅ');
    32. %---------------ÁÐÖØÅÅ
    33. for n=1:hc          
    34.     y(hc+n,:)=y(hc+n,:)-y(n,:);
    35. end  
    36. for n=1:hc          
    37.     k=y(hc+n,:)/2-mod(y(hc+n,:)/2,1);          
    38.     y(n,:)=y(n,:)+k;
    39. end  
    40. subplot(2,3,5);imshow(uint8(y));title('ÁÐÖØÅÅ');
    41. %----------------Öظ´ÉÏÊö²½Ö裬½øÐжþ´ÎѹËõ  
    42. for n=1:lc          
    43.     j=n*2-1;        
    44.     y(:,n)=x(:,j);          
    45.     y(:,lc+n)=x(:,j+1);
    46. end  
    47. for n=1:lc          
    48.     y(:,lc+n)=y(:,lc+n)-y(:,n);
    49. end
    50. for n=1:lc          
    51.     k=y(:,lc+n)/2-mod(y(:,lc+n)/2,1);        
    52.     y(:,n)=y(:,n)+k;
    53. end  
    54. x=y;  
    55. for n=1:hc      
    56.     j=n*2-1;      
    57.     y(n,:)=x(j,:);      
    58.     y(hc+n,:)=x(j+1,:);
    59. end  
    60. for n=1:hc    
    61.     y(hc+n,:)=y(hc+n,:)-y(n,:);
    62. end  
    63. for n=1:hc      
    64.     k=y(hc+n,:)/2-mod(y(hc+n,:)/2,1);    
    65.     y(n,:)=y(n,:)+k;
    66. end
    67. %----------------ÔÙ½øÐÐÆæżÐÐÖØÅźÍÁÐÖØÅÅ  
    68. x=y;  
    69. for n=1:hc    
    70.     j=n*2-1;    
    71.     y(n,:)=x(j,:);  
    72.     y(hc+n,:)=x(j+1,:);
    73. end  
    74. for n=1:hc  
    75.     y(hc+n,:)=y(hc+n,:)-y(n,:);
    76. end
    77. for n=1:hc    
    78.     k=y(hc+n,:)/2-mod(y(hc+n,:)/2,1);    
    79.     y(n,:)=y(n,:)+k;
    80. end
    81. subplot(2,3,6);imshow(uint8(y));title('¶þ´ÎѹËõ ');
    82.  
     
Loading...