Print H M & W in matlab imshow in best and simplest method. Funny Trick
To print H
To print H
>>
h=zeros(60,60);
>>
h(11:50,21)=1;
>>
h(11:50,40)=1;
>>
h(30,21:40)=1;
>>
imshow(h)
To print M and W just put the following commands
m=zeros(60,60);
for a=21:30
for b=21:30
if a==b m(a,b)=1;
end
end
end
m=fliplr(m)+m;
m(21:50,21)=1;
m(21:50,40)=1;
%To print W just rotate the image180. Otherwise just show apply imshow(m) commad.
m=imrotate(m,180);
imshow(m)
No comments:
Post a Comment