function rotasi90ka
%rotasi citra 90 searah jarum jam
A=imread('cameraman.tif');
d=A;
[baris kolom]=size(A);
for i=1:baris;
for j=1:kolom;
d(j, baris+1-i)=A(i,j);
end
end
subplot(1,2,1), imshow(A);
subplot(1,2,2), imshow(d);
%rotasi citra 90 searah jarum jam
A=imread('cameraman.tif');
d=A;
[baris kolom]=size(A);
for i=1:baris;
for j=1:kolom;
d(j, baris+1-i)=A(i,j);
end
end
subplot(1,2,1), imshow(A);
subplot(1,2,2), imshow(d);
ConversionConversion EmoticonEmoticon